2 configurableViewsActionTypes
3 } from 'app/configurableViews/ConfigurableViewConstants.js';
4 import ConfigurableViewReducer from 'app/configurableViews/ConfigurableViewReducer.js'
5 describe('ConfigurableViewsReducerTests', () => {
6 it('Action Type: CONFIGURABLE_VIEWS_CONFIG_RECEIVED', () => {
10 viewName: 'Some View Name',
11 viewRoute: 'some/view/route'
14 type: configurableViewsActionTypes.CONFIGURABLE_VIEWS_CONFIG_RECEIVED,
20 state = ConfigurableViewReducer(state, action);
23 expect(state).toEqual({
24 configurableViewsConfig: data
28 it('Action Type: CUSTOM_COMPONENTS_RECEIVED', () => {
31 componentName: 'someComponentName',
38 type: configurableViewsActionTypes.CUSTOM_COMPONENTS_RECEIVED,
44 state = ConfigurableViewReducer(state, action);
47 expect(state).toEqual({
48 customComponents: data
52 it('Action Type: CUSTOM_ROUTES', () => {
54 const data = 'some/custom/route';
56 type: configurableViewsActionTypes.CUSTOM_ROUTES,
62 state = ConfigurableViewReducer(state, action);
65 expect(state).toEqual({
70 it('Action Type: unknown', () => {
73 type: "TestUnknownType",
79 state = ConfigurableViewReducer(state, action);
82 expect(state).toEqual(state);