From 5a7a13c93428e7c5f5d02cfff86df9d3a8637f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 5 Jul 2026 18:40:59 +0200 Subject: [PATCH] test(records): cover the new report-section toggles in the prefs route fixtures The doctor-report prefs route resolves every toggle to the full canonical shape; the fixtures predate the allergies/familyHistory sections and asserted the seven-key shape. --- .../api/auth/me/doctor-report-prefs/__tests__/route.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/api/auth/me/doctor-report-prefs/__tests__/route.test.ts b/src/app/api/auth/me/doctor-report-prefs/__tests__/route.test.ts index 7fb0012ad..c8ebc622e 100644 --- a/src/app/api/auth/me/doctor-report-prefs/__tests__/route.test.ts +++ b/src/app/api/auth/me/doctor-report-prefs/__tests__/route.test.ts @@ -92,6 +92,8 @@ describe("PUT /api/auth/me/doctor-report-prefs", () => { sleep: false, cycle: false, labs: true, + allergies: true, + familyHistory: false, }; const res = await (PUT as (r: Request) => Promise)(mkPut(body)); expect(res.status).toBe(200); @@ -116,6 +118,8 @@ describe("PUT /api/auth/me/doctor-report-prefs", () => { sleep: false, cycle: false, labs: false, + allergies: false, + familyHistory: false, }; vi.mocked(prisma.user.findUnique).mockResolvedValue({ doctorReportPrefsJson: current,