import { Map } from 'immutable'
import configReducer from '../config'
import { setAPIEndpoint } from '../../actions/config'

describe('config reducer', () => {
  it('properly sets api endpoint', () => {
    const initialState = Map()

    const action = setAPIEndpoint('foo')
    const nextState = configReducer(initialState, action)

    expect(nextState.get('apiEndpoint')).to.equal('foo')
  })
})
