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

26 lines
586 B
PHP

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