snipe-it/tests/Feature/Components/Ui/ComponentIndexTest.php
snipe 8c6ecd35ec Added more basic tests
Signed-off-by: snipe <snipe@snipe.net>
2024-07-05 11:56:24 +01:00

24 lines
537 B
PHP

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