diff --git a/test/server/routes/sources.test.ts b/test/server/routes/sources.test.ts index 9e5a572..1b704bc 100644 --- a/test/server/routes/sources.test.ts +++ b/test/server/routes/sources.test.ts @@ -95,7 +95,7 @@ describe("Source Management API", () => { expect(body.error.code).toBe("SLUG_CONFLICT"); }); - it("6.4.3 — clone failure → 422 CLONE_FAILED, no orphan source in DB", async () => { + it("6.4.3 — clone failure → 422 CLONE_FAILED, no source record created", async () => { const countBefore = repos.sources.findAll().length; const res = await app.inject({ @@ -112,7 +112,7 @@ describe("Source Management API", () => { const body = res.json(); expect(body.error.code).toBe("CLONE_FAILED"); - // Source record must not exist — no orphan + // No source record created — clone-before-create guarantees this expect(repos.sources.findAll().length).toBe(countBefore); expect(repos.sources.findBySlug("clone-fail-test")).toBeUndefined(); });