describe('loginSuccessEpic', () => { | |
it('dispatches actions to change location, authenticated, and stopSubmit', () => { | |
const action = ActionsObservable.of({ | |
type: LOGIN_TYPES.SUCCESS, | |
payload: [{}, {}] | |
}); | |
loginSuccessEpic(action, {}) | |
.toArray() | |
.subscribe((outputActions) => { | |
expect(outputActions).toEqual([ | |
location.createRouteChangeAction( | |
LOCATION.USER_DASHBOARD | |
), | |
switchAuthenticatedFlag(true), | |
stopSubmit(FORM_NAMES.LOGIN) | |
]); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment