3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-03-06 00:19:08 +00:00
Files
snipe-it/tests/Feature/Components/Ui/ComponentIndexTest.php
2024-08-06 20:25:22 +00:00

24 lines
555 B
PHP

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