diff --git a/tests/Feature/Locations/Api/LocationsViewTest.php b/tests/Feature/Locations/Api/LocationsViewTest.php index b5bcff8e4..1d57e5826 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();