Migrated create visit action to use payload

This commit is contained in:
Alejandro Celaya
2022-11-05 13:01:00 +01:00
parent cd90d3e581
commit d588d8d9ef
17 changed files with 54 additions and 51 deletions

View File

@@ -9,9 +9,10 @@ describe('visitCreationReducer', () => {
const visit = Mock.all<Visit>();
it('just returns the action with proper type', () => {
expect(createNewVisits([{ shortUrl, visit }])).toEqual(
{ type: CREATE_VISITS, createdVisits: [{ shortUrl, visit }] },
);
expect(createNewVisits([{ shortUrl, visit }])).toEqual({
type: CREATE_VISITS,
payload: { createdVisits: [{ shortUrl, visit }] },
});
});
});
});