Skip to content

Commit

Permalink
adds test for output route passing an id
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoGongora committed Jun 7, 2024
1 parent f35f870 commit be6957c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Feature/Http/Controllers/OutputControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,16 @@ public function test_delete_with_access(): void

$this->assertSoftDeleted($output);
}

public function test_delete_sending_id(): void
{
$output = Output::factory()->create();

$this->actingAs(User::factory()->create([
'is_admin' => true,
]));

$response = $this->delete(route('collections.outputs.delete', $output->id));
$response->assertRedirectToRoute('collections.outputs.index', $output->collection);
}
}

0 comments on commit be6957c

Please sign in to comment.