* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0 */ use App\Models\Group; use App\Models\User; use Database\Seeders\GroupSeeder; beforeEach(function (): void { $this->staffUser = User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ 'is_owner' => true, 'is_admin' => true, 'is_modo' => true, ])->id, ]); }); test('index returns an ok response', function (): void { $this->seed(GroupSeeder::class); $response = $this->actingAs($this->staffUser)->get(route('staff.cheaters.index')); $response->assertOk(); $response->assertViewIs('Staff.cheater.index'); $response->assertViewHas('cheaters'); });