Add test for AUTH_RECEIVED

pull/1265/head
Jared Scheib 2017-04-17 12:22:30 -07:00
parent 8acbc267b9
commit 6f1cc286df
1 changed files with 8 additions and 0 deletions

View File

@ -43,4 +43,12 @@ describe('Shared.Reducers.authReducer', () => {
expect(reducedState.isAuthLoading).to.equal(true)
})
it('should handle AUTH_RECEIVED', () => {
const loadingState = Object.assign({}, initialState, {isAuthLoading: true})
const reducedState = authReducer(loadingState, authReceived(defaultAuth))
expect(reducedState.links[0]).to.deep.equal(defaultAuth.links[0])
expect(reducedState.isAuthLoading).to.equal(false)
})
})