snipe-it/tests/Feature/Groups/Ui/IndexGroupTest.php
2024-08-06 20:25:22 +00:00

26 lines
604 B
PHP

<?php
namespace Tests\Feature\Groups\Ui;
use App\Models\User;
use Tests\TestCase;
final class IndexGroupTest extends TestCase
{
public function testPermissionRequiredToViewGroupList(): void
{
$this->actingAs(User::factory()->create())
->get(route('groups.index'))
->assertForbidden();
//$this->followRedirects($response)->assertSee('sad-panda.png');
}
public function testUserCanListGroups(): void
{
$this->actingAs(User::factory()->superuser()->create())
->get(route('groups.index'))
->assertOk();
}
}