seed(CityWorldSeeder::class); $city = City::query()->where('slug', 'city10')->first(); $this->assertNotNull($city); $this->assertTrue($city->is_active); $this->assertSame(4, $city->jobs()->count()); $user = User::factory()->create(['status' => User::STATUS_ACTIVE, 'is_active' => true]); $this->seed(CityWorldSeeder::class); $this->assertNotNull(Character::query()->where('user_id', $user->id)->first()); } /** * Migration backfills legacy is_active flags onto status. */ public function test_status_backfill_matches_is_active(): void { $this->seed(CityWorldSeeder::class); $active = User::where('is_active', true)->where('status', '!=', User::STATUS_ACTIVE)->count(); $this->assertSame(0, $active); } }