Add test case
This commit is contained in:
parent
de403f6e07
commit
76c9015aa9
1 changed files with 7 additions and 0 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Reference in a new issue