Add test case

This commit is contained in:
Marcus Moore 2024-09-09 16:51:40 -07:00
parent de403f6e07
commit 76c9015aa9
No known key found for this signature in database

View file

@ -27,6 +27,13 @@ class CreateAccessoriesTest extends TestCase
->assertViewIs('accessories.edit');
}
public function testRequiresPermissionToCreateAccessory()
{
$this->actingAs(User::factory()->create())
->post(route('accessories.store'))
->assertForbidden();
}
public function testValidDataRequiredToCreateAccessory()
{
$this->actingAs(User::factory()->createAccessories()->create())