From 5d5f421294195c4a88db5c4f8cf87fe47ef2c326 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Mon, 9 Sep 2024 16:49:43 -0700 Subject: [PATCH] Add test case --- tests/Feature/Companies/Ui/CreateCompaniesTest.php | 7 +++++++ 1 file changed, 7 insertions(+) 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())