mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Add test case
This commit is contained in:
parent
35533c39d5
commit
5d5f421294
|
@ -22,6 +22,13 @@ class CreateCompaniesTest extends TestCase
|
||||||
->assertViewIs('companies.edit');
|
->assertViewIs('companies.edit');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testRequiresPermissionToCreateCompany()
|
||||||
|
{
|
||||||
|
$this->actingAs(User::factory()->create())
|
||||||
|
->post(route('companies.store'))
|
||||||
|
->assertForbidden();
|
||||||
|
}
|
||||||
|
|
||||||
public function testValidDataRequiredToCreateCompany()
|
public function testValidDataRequiredToCreateCompany()
|
||||||
{
|
{
|
||||||
$this->actingAs(User::factory()->createCompanies()->create())
|
$this->actingAs(User::factory()->createCompanies()->create())
|
||||||
|
|
Loading…
Reference in a new issue