From 590d13061a64b4e78a7e6b57468d56153a13833b Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 24 Jul 2024 20:57:26 +0100 Subject: [PATCH] One more test Signed-off-by: snipe --- tests/Feature/Locations/Api/LocationsViewTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Feature/Locations/Api/LocationsViewTest.php b/tests/Feature/Locations/Api/LocationsViewTest.php index b5bcff8e4d..1d57e58263 100644 --- a/tests/Feature/Locations/Api/LocationsViewTest.php +++ b/tests/Feature/Locations/Api/LocationsViewTest.php @@ -18,6 +18,14 @@ class LocationsViewTest extends TestCase } public function testViewingLocationAssetIndexRequiresPermission() + { + $location = Location::factory()->create(); + $this->actingAsForApi(User::factory()->create()) + ->getJson(route('api.locations.viewassets', $location->id)) + ->assertForbidden(); + } + + public function testViewingLocationAssetIndex() { $location = Location::factory()->create(); Asset::factory()->count(3)->assignedToLocation($location)->create();