create(); $hunt = Hunts::create([ 'title' => 'Test Hunt', 'slug' => 'test-hunt-' . uniqid(), 'status' => HuntStatus::PUBLISHED, 'difficulty' => HuntDifficulty::EASY, 'city' => 'Paris', 'creator_id' => $user->id, 'latitude' => 0, 'longitude' => 0, 'is_public' => true ]); // Participate $hunt->participants()->attach($user->id, ['status' => 'started', 'current_step_number' => 1]); $response = $this->actingAs($user)->getJson('/api/hunts?participating=true'); $response->assertStatus(200) ->assertJsonCount(1, 'data') ->assertJsonFragment(['id' => $hunt->id]); }); test('guest receiving empty list when filtering participating hunts', function () { $response = $this->getJson('/api/hunts?participating=true'); $response->assertStatus(200) ->assertJsonCount(0, 'data'); });