Fix patient history store test for paginated digitization-history URL.
CI / changes (push) Successful in 19s
CI / backend (push) Skipped
node-ci / build (push) Successful in 3m37s
CI / frontend (push) Successful in 3m42s

This commit is contained in:
2026-12-01 01:16:49 +08:00
parent a17bc2b734
commit dd76d987f0
@@ -411,6 +411,9 @@ describe('useBatchStore', () => {
promotedBatches: 2,
supersededBatches: 1,
pendingBatches: 0,
page: 1,
pageSize: 50,
totalPages: 1,
entries: [],
}
mockedGet.mockResolvedValueOnce({ success: true, statusCode: 200, data: history, error: null })
@@ -419,7 +422,9 @@ describe('useBatchStore', () => {
const result = await store.getPatientHistory('p1')
expect(result).toEqual(history)
expect(mockedGet).toHaveBeenCalledWith('patients/p1/digitization-history')
expect(mockedGet).toHaveBeenCalledWith(
'patients/p1/digitization-history?page=1&pageSize=50',
)
})
it('returns null and sets error on failure', async () => {