Files
snipe-it/tests/Feature/Locations/Ui/IndexLocationsTest.php
2026-03-16 17:40:57 -07:00

24 lines
542 B
PHP

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