forked from yvv/decision
WIP lot S : floor_amend retiré (le quorum le remplace), fixture de production sous tests/fixtures/seed-production-2026-11-02/, reprise des tests (api, inertia, ballots, objections, typos)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -491,13 +491,25 @@ mod tests {
|
||||
let state = AppState::new(Config::for_tests(), db).await.expect("state");
|
||||
seed::ensure(&state).await.expect("seed");
|
||||
let now = "2026-10-31T00:00:00Z";
|
||||
// A seed proposal (ADR 0011) the vote has just put in force.
|
||||
let (id, doc, revision, title, body): (String, String, i64, String, String) = sqlx::query_as(
|
||||
"SELECT p.id, u.doc_id, p.revision, p.title, p.body FROM proposals p JOIN units u ON u.id = p.unit_id
|
||||
WHERE p.status = 'in_force' AND p.kind = 'text' LIMIT 1",
|
||||
WHERE p.status = 'open' AND p.seed_featured = 1 AND p.kind = 'text' LIMIT 1",
|
||||
)
|
||||
.fetch_one(&state.db)
|
||||
.await
|
||||
.expect("a version in force");
|
||||
.expect("a seed proposal");
|
||||
sqlx::query("UPDATE proposals SET status = 'in_force', entered_at = ? WHERE id = ?")
|
||||
.bind(now)
|
||||
.bind(&id)
|
||||
.execute(&state.db)
|
||||
.await
|
||||
.expect("in force");
|
||||
sqlx::query("UPDATE units SET in_force_id = ?1 WHERE id = (SELECT unit_id FROM proposals WHERE id = ?1)")
|
||||
.bind(&id)
|
||||
.execute(&state.db)
|
||||
.await
|
||||
.expect("unit");
|
||||
sqlx::query(
|
||||
"INSERT INTO identities (id, kind, display_name, created_at) VALUES ('dev:aude', 'dev', 'Aude', ?)",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user