UNPKG

ignite-jhipster

Version:

A React Native boilerplate for JHipster apps.

22 lines (15 loc) 714 B
import Actions, { reducer, INITIAL_STATE } from '../../../../../app/modules/account/password/change-password.reducer' test('change password request', () => { const state = reducer(INITIAL_STATE, Actions.changePasswordRequest()) expect(state.fetching).toBe(true) }) test('change password success', () => { const state = reducer(INITIAL_STATE, Actions.changePasswordSuccess()) expect(state.fetching).toBe(false) expect(state.error).toBe(null) }) test('change password failure', () => { const state = reducer(INITIAL_STATE, Actions.changePasswordFailure({ error: 'Passwords do not match' })) expect(state.fetching).toBe(false) expect(state.error).toEqual({ error: 'Passwords do not match' }) })