diff options
| -rw-r--r-- | test/reducers/user.spec.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/test/reducers/user.spec.js b/test/reducers/user.spec.js index cd06ae07d8..bd133f5f4b 100644 --- a/test/reducers/user.spec.js +++ b/test/reducers/user.spec.js @@ -1,21 +1,23 @@ import { expect } from 'chai'; import reducer from '../../app/reducers/user'; +import { LoginState } from '../../app/constants'; describe('reducers', () => { describe('user', () => { - // it('should handle USER_LOGIN', () => { - // const action = { - // type: 'USER_LOGIN', - // payload: { - // username: 'John Doe', - // loggedIn: true - // } - // }; - // const test = Object.assign({}, action.payload); - // expect(reducer({}, action)).to.deep.equal(test); - // }); + it('should handle USER_LOGIN_CHANGE', () => { + const action = { + type: 'USER_LOGIN_CHANGE', + payload: { + account: '1111', + status: LoginState.failed, + error: new Error('Something went wrong') + } + }; + const test = Object.assign({}, action.payload); + expect(reducer({}, action)).to.deep.equal(test); + }); }); |
