Questions about relationship analyses too
CI / test (push) Successful in 1m6s
CI / build (push) Successful in 5m1s
CI / deploy (push) Skipped

- The answer sees both charts and the comparison; both people see the questions
- Heading, hint and example question per analysis kind

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-18 21:51:38 +00:00
co-authored by Claude Opus 5.5
parent 02e4e225f0
commit 029a001ca6
11 changed files with 116 additions and 29 deletions
+12
View File
@@ -761,6 +761,18 @@ async fn synastry_analyses_use_synastry_units(pool: PgPool) {
app.get("/v1/credits", Some(&anna)).await.body["balance"],
json!({"natal": 1, "synastry": 0, "forecast": 0, "question": 0})
);
// questions can be asked about the relationship analysis too
let analysis = r.body["id"].as_str().unwrap().to_string();
sqlx::query("UPDATE analyses SET status = 'done', content = '{\"title\": \"Kettőtök\"}' WHERE kind = 'synastry'")
.execute(&app.pool)
.await
.unwrap();
grant_units(&app, &anna, "question", 1).await;
let r = app
.post(&format!("/v1/analyses/{analysis}/questions"), Some(&anna), json!({"question": "Mire figyeljünk?"}))
.await;
assert_eq!((r.status, r.body["status"].as_str()), (StatusCode::ACCEPTED, Some("pending")), "{}", r.body);
}
#[sqlx::test(migrator = "db::MIGRATOR")]