Skip to content
Snippets Groups Projects

Call logout api when logging out

Merged Albin Henriksson requested to merge 88-log-out-in-server-when-logging-out-in-client into dev
4 files
+ 26
11
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -39,6 +39,9 @@ it('dispatches correct actions when logging in user', async () => {
})
it('dispatches correct action when logging out user', async () => {
;(mockedAxios.post as jest.Mock).mockImplementation((path: string, params?: any) => {
return Promise.resolve({ data: {} })
})
const store = mockStore({})
await logoutUser()(store.dispatch)
expect(store.getActions()).toEqual([{ type: Types.SET_UNAUTHENTICATED }])
Loading