Migrated deleteShortUrl action creator to use PayloadAction and have a single param

This commit is contained in:
Alejandro Celaya
2022-11-06 12:46:29 +01:00
parent 2a268de2cb
commit d468fb1efe
5 changed files with 36 additions and 20 deletions

View File

@@ -52,7 +52,7 @@ describe('shortUrlsListReducer', () => {
error: false,
};
expect(reducer(state, { type: SHORT_URL_DELETED, shortCode } as any)).toEqual({
expect(reducer(state, { type: SHORT_URL_DELETED, payload: { shortCode } } as any)).toEqual({
shortUrls: {
data: [{ shortCode, domain: 'example.com' }, { shortCode: 'foo' }],
pagination: { totalItems: 9 },