Add validation test

This commit is contained in:
Marcus Moore 2024-09-04 15:48:11 -07:00
parent 9c6718b459
commit 010f66f4c9
No known key found for this signature in database

View file

@ -29,7 +29,15 @@ class CreateAccessoriesTest extends TestCase
public function testValidDataRequiredToCreateAccessory()
{
$this->markTestIncomplete();
$this->actingAs(User::factory()->createAccessories()->create())
->post(route('accessories.store'), [
//
])
->assertSessionHasErrors([
'name',
'qty',
'category_id',
]);
}
public function testCanCreateAccessory()