Skip to content

Commit

Permalink
ENG-5427 fix actions test
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjpburgos authored and ryanjpburgos committed Jan 17, 2024
1 parent b8e4cb5 commit 77acd20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/state/avatar/actions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('fetchAvatar', () => {

it('should retrieve the avatar successfully', async () => {
const dispatch = jest.fn();
jest.spyOn(apiHelper, 'getAvatar').mockResolvedValue({ ok: true, json: () => Promise.resolve({ payload: { filename: 'test.png' } }) });
jest.spyOn(apiHelper, 'getAvatar').mockResolvedValue({ ok: true, json: () => Promise.resolve({ payload: { filename: 'test.png', useGravatar: false } }) });
await fetchAvatar()(dispatch);
expect(dispatch).toHaveBeenCalledWith({ payload: { id: 'fetchAvatar' }, type: 'loading/toggle-loading' });
expect(dispatch).toHaveBeenCalledWith({ payload: { useGravatar: false }, type: 'avatar/useGravatar' });
Expand Down

0 comments on commit 77acd20

Please sign in to comment.