test(measurements): pin the null-trigger stamp on a batch that declares none

This commit is contained in:
Marc-André Bombeck committed 2026-07-27 14:35:34 +02:00
1 parent 7e4b9d9be9
commit d222aa2354
2 files changed
+14 -2

No files matched your search

@@ -153,7 +153,12 @@ describe("POST /api/measurements/batch — PR detection enqueue (v1.4.25 W16c)",
expect(prisma.user.update).toHaveBeenCalledTimes(1);
expect(prisma.user.update).toHaveBeenCalledWith({
where: { id: "user-1" },
data: { healthKitLastSyncedAt: expect.any(Date) },
// This batch declares no trigger, so the trigger field is nulled and the
// background timestamp is not written — see the sync-trigger suite.
data: {
healthKitLastSyncedAt: expect.any(Date),
healthKitLastSyncTrigger: null,
},
});
});