snipe-it/tests/Feature/Locations/Ui/IndexLocationsTest.php
snipe 7455bf329d Added more locations tests
Signed-off-by: snipe <snipe@snipe.net>
2024-07-05 08:21:31 +01:00

24 lines
534 B
PHP

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