Fix patient history store test for paginated digitization-history URL.
This commit is contained in:
@@ -411,6 +411,9 @@ describe('useBatchStore', () => {
|
|||||||
promotedBatches: 2,
|
promotedBatches: 2,
|
||||||
supersededBatches: 1,
|
supersededBatches: 1,
|
||||||
pendingBatches: 0,
|
pendingBatches: 0,
|
||||||
|
page: 1,
|
||||||
|
pageSize: 50,
|
||||||
|
totalPages: 1,
|
||||||
entries: [],
|
entries: [],
|
||||||
}
|
}
|
||||||
mockedGet.mockResolvedValueOnce({ success: true, statusCode: 200, data: history, error: null })
|
mockedGet.mockResolvedValueOnce({ success: true, statusCode: 200, data: history, error: null })
|
||||||
@@ -419,7 +422,9 @@ describe('useBatchStore', () => {
|
|||||||
const result = await store.getPatientHistory('p1')
|
const result = await store.getPatientHistory('p1')
|
||||||
|
|
||||||
expect(result).toEqual(history)
|
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 () => {
|
it('returns null and sets error on failure', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user