test(FN-5127): align FN-5124 QA test with idempotent re-delete

Fusion-Task-Id: FN-5127
Fusion-Task-Lineage: aafbc6a7-fa26-4dad-ab16-96ea79f8cee2
This commit is contained in:
Fusion (runfusion.ai)
2026-05-19 06:05:13 -07:00
committed by gsxdsm
parent 9046182b51
commit 5ea5252549

View File

@@ -13,7 +13,7 @@ describe("soft-delete QA boundary audit (FN-5124)", () => {
await harness.afterEach();
});
it("re-delete is deterministic: second delete fails not-found and does not emit duplicate task:deleted", async () => {
it("re-delete is deterministic: repeated deletes are no-op and do not emit duplicate task:deleted", async () => {
const store = harness.store();
const task = await store.createTask({ column: "todo", description: "redelete target" });
@@ -24,7 +24,7 @@ describe("soft-delete QA boundary audit (FN-5124)", () => {
const firstDeletedAt = ((store as any).db.prepare("SELECT deletedAt FROM tasks WHERE id = ?").get(task.id) as { deletedAt: string | null })
.deletedAt;
await expect(store.deleteTask(task.id)).rejects.toThrow(`Task ${task.id} not found`);
await expect(store.deleteTask(task.id)).resolves.toMatchObject({ id: task.id, deletedAt: firstDeletedAt });
const secondDeletedAt = ((store as any).db.prepare("SELECT deletedAt FROM tasks WHERE id = ?").get(task.id) as { deletedAt: string | null })
.deletedAt;