diff --git a/web/src/app/api/requests/[id]/pause/route.test.ts b/web/src/app/api/requests/[id]/pause/route.test.ts index ad761f7..bf8ac96 100644 --- a/web/src/app/api/requests/[id]/pause/route.test.ts +++ b/web/src/app/api/requests/[id]/pause/route.test.ts @@ -35,9 +35,11 @@ describe("per-item pause API", () => { }); it("rejects pausing an in-flight job", async () => { - const created = await seed({ state: "downloading" }); - const res = await POST(req(created.id, true), { params: Promise.resolve({ id: created.id }) }); + const created = await seed({ state: "downloading", paused: true }); + const res = await POST(req(created.id, false), { params: Promise.resolve({ id: created.id }) }); expect(res.status).toBe(400); + const job = await prisma.job.findUnique({ where: { id: created.job!.id } }); + expect(job?.paused).toBe(true); }); it("404s for a missing request", async () => {