One more test

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-07-24 20:57:26 +01:00
parent c3a2cdeee9
commit 590d13061a

View file

@ -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();