UNPKG

contiago-toolbar

Version:

One of the options for outputting content from contiago xml-server

21 lines (17 loc) 503 B
import { fromJS } from 'immutable'; import languageProviderReducer from '../reducer'; import { CHANGE_LOCALE, } from '../constants'; describe('languageProviderReducer', () => { it('returns the initial state', () => { expect(languageProviderReducer(undefined, {})).toEqual(fromJS({ locale: 'en', })); }); it('changes the locale', () => { expect(languageProviderReducer(undefined, { type: CHANGE_LOCALE, locale: 'de' }).toJS()).toEqual({ locale: 'de', }); }); });