Ensured new visits are pushed to the state only if they match selected date range

This commit is contained in:
Alejandro Celaya
2021-10-24 10:31:32 +02:00
parent 36af3c3dd0
commit e135dd92ec
8 changed files with 61 additions and 19 deletions

View File

@@ -124,7 +124,7 @@ describe('orphanVisitsReducer', () => {
expect(dispatchMock).toHaveBeenCalledTimes(2);
expect(dispatchMock).toHaveBeenNthCalledWith(1, { type: GET_ORPHAN_VISITS_START });
expect(dispatchMock).toHaveBeenNthCalledWith(2, { type: GET_ORPHAN_VISITS, visits });
expect(dispatchMock).toHaveBeenNthCalledWith(2, { type: GET_ORPHAN_VISITS, visits, query: query ?? {} });
expect(ShlinkApiClient.getOrphanVisits).toHaveBeenCalledTimes(1);
});
});