get(route($route))->assertRedirect('/login'); })->with($adminRoutes); it('forbids non-admin users from the admin console', function (string $route) { $user = User::factory()->create(['is_admin' => false]); $this->actingAs($user)->get(route($route))->assertForbidden(); })->with($adminRoutes); it('renders the admin console for admins', function (string $route) { $admin = User::factory()->create(['is_admin' => true]); $this->actingAs($admin)->get(route($route)) ->assertOk() ->assertSee('CluPilot'); })->with($adminRoutes);