UNPKG

ignite-jhipster

Version:

A React Native boilerplate for JHipster apps.

22 lines (15 loc) 706 B
import Actions, { reducer, INITIAL_STATE } from '../../../../../app/modules/account/password-reset/forgot-password.reducer' test('forgot password request', () => { const state = reducer(INITIAL_STATE, Actions.forgotPasswordRequest()) expect(state.fetching).toBe(true) }) test('forgot password success', () => { const state = reducer(INITIAL_STATE, Actions.forgotPasswordSuccess()) expect(state.fetching).toBe(false) expect(state.error).toBe(null) }) test('forgot password failure', () => { const state = reducer(INITIAL_STATE, Actions.forgotPasswordFailure({ error: 'Email not found' })) expect(state.fetching).toBe(false) expect(state.error).toEqual({ error: 'Email not found' }) })