wip: checkpoint multi-game core work
This commit is contained in:
@@ -1404,10 +1404,14 @@ async fn test_rivals_reward_increments_week_counter() {
|
||||
"goals_for": 1, "goals_against": 0, "mode": "squad_battles"
|
||||
})).await;
|
||||
|
||||
json_post(&app, "/rivals/claim-weekly", serde_json::json!({})).await;
|
||||
// First claim succeeds
|
||||
let (s, json) = json_post(&app, "/rivals/claim-weekly", serde_json::json!({})).await;
|
||||
assert_eq!(s, StatusCode::OK, "{json}");
|
||||
assert_eq!(json["week_number"], 2, "second claim should be week 2");
|
||||
assert_eq!(json["week_number"], 1, "first claim should be week 1");
|
||||
|
||||
// Immediate re-claim is blocked by the 24-hour cooldown
|
||||
let (s, _) = json_post(&app, "/rivals/claim-weekly", serde_json::json!({})).await;
|
||||
assert_eq!(s, StatusCode::CONFLICT, "re-claim within 24h should be rejected");
|
||||
}
|
||||
|
||||
// ── Phase 15: Pack Store ──────────────────────────────────────────────────────
|
||||
@@ -1711,7 +1715,7 @@ async fn test_auth_reset_clears_profile() {
|
||||
})).await;
|
||||
|
||||
// Reset
|
||||
let (status, json) = json_post(&app, "/auth/reset", serde_json::json!({})).await;
|
||||
let (status, json) = json_post(&app, "/auth/reset", serde_json::json!({ "confirm": "reset" })).await;
|
||||
assert_eq!(status, StatusCode::OK, "{json}");
|
||||
assert_eq!(json["reset"], true);
|
||||
|
||||
@@ -1729,7 +1733,7 @@ async fn test_auth_reset_allows_new_profile() {
|
||||
let app = build_test_app().await;
|
||||
auth(&app, "FirstProfile").await;
|
||||
|
||||
json_post(&app, "/auth/reset", serde_json::json!({})).await;
|
||||
json_post(&app, "/auth/reset", serde_json::json!({ "confirm": "reset" })).await;
|
||||
|
||||
// Should be able to create a new profile after reset
|
||||
let (status, json) = json_post(&app, "/auth/local",
|
||||
|
||||
Reference in New Issue
Block a user