You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
717 B
25 lines
717 B
import infoReducer, { GET_INFO, RECEIVE_INFO } from 'reducers/info'
|
|
|
|
describe('reducers', () => {
|
|
describe('infoReducer', () => {
|
|
it('should handle initial state', () => {
|
|
expect(infoReducer(undefined, {})).toMatchSnapshot()
|
|
})
|
|
|
|
it('should have GET_INFO', () => {
|
|
expect(GET_INFO).toEqual('GET_INFO')
|
|
})
|
|
|
|
it('should have RECEIVE_INFO', () => {
|
|
expect(RECEIVE_INFO).toEqual('RECEIVE_INFO')
|
|
})
|
|
|
|
it('should correctly getInfo', () => {
|
|
expect(infoReducer(undefined, { type: GET_INFO })).toMatchSnapshot()
|
|
})
|
|
|
|
it('should correctly receiveInfo', () => {
|
|
expect(infoReducer(undefined, { type: RECEIVE_INFO, data: 'foo' })).toMatchSnapshot()
|
|
})
|
|
})
|
|
})
|
|
|