Skip to content

A free open source IT asset/license management system

Add test case

Marcus Moore5d5f42129419
diff --git a/tests/Feature/Companies/Ui/CreateCompaniesTest.php b/tests/Feature/Companies/Ui/CreateCompaniesTest.php
index a00e208350..18d95d401a 100644
--- a/tests/Feature/Companies/Ui/CreateCompaniesTest.php
+++ b/tests/Feature/Companies/Ui/CreateCompaniesTest.php
@@ -22,6 +22,13 @@ class CreateCompaniesTest extends TestCase
->assertViewIs('companies.edit');
}
+ public function testRequiresPermissionToCreateCompany()
+ {
+ $this->actingAs(User::factory()->create())
+ ->post(route('companies.store'))
+ ->assertForbidden();
+ }
+
public function testValidDataRequiredToCreateCompany()
{
$this->actingAs(User::factory()->createCompanies()->create())