get(route('dashboard'))->assertRedirect(route('login')); } public function test_dashboard_can_be_rendered(): void { $user = User::factory()->create(); $this->actingAs($user) ->get(route('dashboard')) ->assertOk(); } public function test_dashboard_shows_stats_with_data(): void { $user = User::factory()->create(); $console = Console::factory()->create(); $game = Game::factory()->create(['console_id' => $console->id]); RomFile::factory()->create(['game_id' => $game->id]); $this->actingAs($user) ->get(route('dashboard')) ->assertOk(); } public function test_dashboard_shows_recent_games(): void { $user = User::factory()->create(); $console = Console::factory()->create(); Game::factory()->count(3)->create(['console_id' => $console->id]); $this->actingAs($user) ->get(route('dashboard')) ->assertOk(); } public function test_dashboard_shows_consoles(): void { $user = User::factory()->create(); Console::factory()->count(5)->create(); $this->actingAs($user) ->get(route('dashboard')) ->assertOk(); } public function test_dashboard_with_empty_data(): void { $user = User::factory()->create(); $this->actingAs($user) ->get(route('dashboard')) ->assertOk(); } }