Ensured domain is dispatched when modifying a short URL somehow

This commit is contained in:
Alejandro Celaya
2020-02-08 10:46:11 +01:00
parent 01e69fb6ca
commit 666d2d3065
8 changed files with 33 additions and 16 deletions

View File

@@ -72,7 +72,7 @@ describe('shortUrlDeletionReducer', () => {
expect(dispatch).toHaveBeenCalledTimes(2);
expect(dispatch).toHaveBeenNthCalledWith(1, { type: DELETE_SHORT_URL_START });
expect(dispatch).toHaveBeenNthCalledWith(2, { type: SHORT_URL_DELETED, shortCode });
expect(dispatch).toHaveBeenNthCalledWith(2, { type: SHORT_URL_DELETED, shortCode, domain });
expect(apiClientMock.deleteShortUrl).toHaveBeenCalledTimes(1);
expect(apiClientMock.deleteShortUrl).toHaveBeenCalledWith(shortCode, domain);