snipe-it/tests/Feature/Locations/Ui/IndexLocationsTest.php

24 lines
532 B
PHP
Raw Normal View History

<?php
2024-07-17 11:04:35 -07:00
namespace Tests\Feature\Locations\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();
}
}