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

23 lines
551 B
PHP

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