Skip to content

Commit be6957c

Browse files
adds test for output route passing an id
1 parent f35f870 commit be6957c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/Feature/Http/Controllers/OutputControllerTest.php

+12
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,16 @@ public function test_delete_with_access(): void
4949

5050
$this->assertSoftDeleted($output);
5151
}
52+
53+
public function test_delete_sending_id(): void
54+
{
55+
$output = Output::factory()->create();
56+
57+
$this->actingAs(User::factory()->create([
58+
'is_admin' => true,
59+
]));
60+
61+
$response = $this->delete(route('collections.outputs.delete', $output->id));
62+
$response->assertRedirectToRoute('collections.outputs.index', $output->collection);
63+
}
5264
}

0 commit comments

Comments
 (0)