mirror of
https://github.com/snipe/snipe-it.git
synced 2026-02-19 09:55:36 +00:00
Add test case
This commit is contained in:
@ -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())
|
||||
|
||||
Reference in New Issue
Block a user