snipe_it/tests/Feature/Locations/Ui/IndexLocationsTest.php
2024-08-06 20:25:22 +00:00

23 lines
550 B
PHP

<?php
namespace Tests\Feature\Locations\Ui;
use App\Models\User;
use Tests\TestCase;
final class IndexLocationsTest extends TestCase
{
public function testPermissionRequiredToViewLocationsList(): void
{
$this->actingAs(User::factory()->create())
->get(route('locations.index'))
->assertForbidden();
}
public function testUserCanListLocations(): void
{
$this->actingAs(User::factory()->superuser()->create())
->get(route('locations.index'))
->assertOk();
}
}