2024-07-05 03:56:24 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests\Feature\Groups\Ui;
|
|
|
|
|
|
|
|
use App\Models\User;
|
|
|
|
use Tests\TestCase;
|
|
|
|
|
|
|
|
class IndexGroupTest extends TestCase
|
|
|
|
{
|
2024-08-06 13:25:22 -07:00
|
|
|
public function testPermissionRequiredToViewGroupList(): void
|
2024-07-05 03:56:24 -07:00
|
|
|
{
|
|
|
|
$this->actingAs(User::factory()->create())
|
|
|
|
->get(route('groups.index'))
|
|
|
|
->assertForbidden();
|
|
|
|
|
|
|
|
//$this->followRedirects($response)->assertSee('sad-panda.png');
|
|
|
|
}
|
|
|
|
|
2024-08-06 13:25:22 -07:00
|
|
|
public function testUserCanListGroups(): void
|
2024-07-05 03:56:24 -07:00
|
|
|
{
|
|
|
|
$this->actingAs(User::factory()->superuser()->create())
|
|
|
|
->get(route('groups.index'))
|
|
|
|
->assertOk();
|
|
|
|
}
|
|
|
|
}
|