3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-04-08 08:49:02 +00:00
Files
snipe-it/tests/Feature/Components/Ui/ComponentIndexTest.php
2026-03-16 17:40:57 -07:00

24 lines
547 B
PHP

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