UNPKG

admin-on-rest-fr05t1k

Version:

A frontend Framework for building admin applications on top of REST services, using ES6, React and Material UI

15 lines (12 loc) 490 B
import assert from 'assert'; import reducer from './locale'; import { DEFAULT_LOCALE } from '../i18n/index'; import { CHANGE_LOCALE } from '../actions/localeActions'; describe('locale reducer', () => { it('should return DEFAULT_LOCALE by default', () => { assert.equal(DEFAULT_LOCALE, reducer()(undefined, {})); }); it('should change with CHANGE_LOCALE actions', () => { assert.equal('fr', reducer()('en', { type: CHANGE_LOCALE, payload: 'fr' })); }); });