Updated Short URLs list so that it allows setting default orderBy from settings

This commit is contained in:
Alejandro Celaya
2021-12-24 13:14:13 +01:00
parent d8442e435d
commit 57075c581d
12 changed files with 69 additions and 69 deletions

View File

@@ -10,14 +10,10 @@ describe('shortUrlsListParamsReducer', () => {
expect(reducer(undefined, { type: LIST_SHORT_URLS, params: { searchTerm: 'foo', page: '2' } } as any)).toEqual({
page: '2',
searchTerm: 'foo',
orderBy: { dateCreated: 'DESC' },
}));
it('returns default value when action is RESET_SHORT_URL_PARAMS', () =>
expect(reducer(undefined, { type: RESET_SHORT_URL_PARAMS } as any)).toEqual({
page: '1',
orderBy: { dateCreated: 'DESC' },
}));
expect(reducer(undefined, { type: RESET_SHORT_URL_PARAMS } as any)).toEqual({ page: '1' }));
});
describe('resetShortUrlParams', () => {