diff --git a/server/store/postgres_integration_test.go b/server/store/postgres_integration_test.go index 961ba55e..9090b0cb 100644 --- a/server/store/postgres_integration_test.go +++ b/server/store/postgres_integration_test.go @@ -446,6 +446,9 @@ func TestPostgreSQLRankedSeasonRolloverIsExactlyOnce(t *testing.T) { if _, err := db.ExecContext(ctx, `INSERT INTO ratings (player_id, rating, deviation, volatility, ranked_games) VALUES ('season-player', 1900, 100, 0.12, 25)`); err != nil { t.Fatal(err) } + if _, err := db.ExecContext(ctx, `INSERT INTO seasons (season_id, playlist, starts_at, ends_at) VALUES ('season-1', 'ranked', $1, $2)`, now.Add(-12*7*24*time.Hour), now); err != nil { + t.Fatal(err) + } profile := domain.RankedProfile{Rating: domain.Rating{Value: 1900, RD: 100, Volatility: 0.12}, RankedGames: 25} updated, applied, err := ApplyRankedSeasonRollover(ctx, db, "season-player", "season-1", profile, now) if err != nil || !applied {