Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.