mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-15 01:54:09 -08:00
24 lines
532 B
PHP
24 lines
532 B
PHP
<?php
|
|
|
|
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();
|
|
}
|
|
}
|