Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/server/routes/sources.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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();
});
Expand Down
Loading