feat(consistency): rebuild authoritative intake IDs
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a023c0-a0a3-7c03-b395-5a0d2757214d
This commit is contained in:
parent
03c7924b7f
commit
059de9358e
5 changed files with 68 additions and 6 deletions
|
|
@ -48,6 +48,17 @@ class TestIntakeCreateAndRead:
|
|||
assert body["lane"] == "green"
|
||||
assert body["outcome"] is None
|
||||
|
||||
async def test_create_preserves_explicit_authoritative_id(self, client):
|
||||
await _create_domain(client)
|
||||
topic = await _create_topic(client)
|
||||
expected = "11111111-1111-4111-8111-111111111111"
|
||||
r = await client.post(
|
||||
"/intakes/",
|
||||
json={"id": expected, "title": "file intake", "topic_id": topic["id"]},
|
||||
)
|
||||
assert r.status_code == 201
|
||||
assert r.json()["id"] == expected
|
||||
|
||||
async def test_get_unknown_intake_404s(self, client):
|
||||
r = await client.get("/intakes/00000000-0000-0000-0000-000000000000")
|
||||
assert r.status_code == 404
|
||||
|
|
|
|||
|
|
@ -407,6 +407,17 @@ class TestTasks:
|
|||
# ---------------------------------------------------------------------------
|
||||
|
||||
class TestDecisions:
|
||||
async def test_create_preserves_explicit_authoritative_id(self, client):
|
||||
await _create_domain(client)
|
||||
topic = await _create_topic(client)
|
||||
expected = "22222222-2222-4222-8222-222222222222"
|
||||
r = await client.post(
|
||||
"/decisions/",
|
||||
json={"id": expected, "title": "File decision", "topic_id": topic["id"]},
|
||||
)
|
||||
assert r.status_code == 201
|
||||
assert r.json()["id"] == expected
|
||||
|
||||
async def test_create_and_resolve(self, client):
|
||||
await _create_domain(client)
|
||||
topic = await _create_topic(client)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue