move background
This commit is contained in:
parent
58123210ab
commit
d886d7de29
7 changed files with 82 additions and 56 deletions
22
test/settings/reducers/setting.test.js
Normal file
22
test/settings/reducers/setting.test.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
import { expect } from "chai";
|
||||
import actions from 'settings/actions';
|
||||
import settingReducer from 'settings/reducers/setting';
|
||||
|
||||
describe("setting reducer", () => {
|
||||
it('return the initial state', () => {
|
||||
let state = settingReducer(undefined, {});
|
||||
expect(state).to.have.deep.property('settings', {});
|
||||
});
|
||||
|
||||
it('return next state for SETTING_SET_SETTINGS', () => {
|
||||
let action = {
|
||||
type: actions.SETTING_SET_SETTINGS,
|
||||
settings: { value1: 'hello', value2: 'world' },
|
||||
};
|
||||
let state = settingReducer(undefined, action);
|
||||
expect(state).to.have.deep.property('settings', {
|
||||
value1: 'hello',
|
||||
value2: 'world',
|
||||
});
|
||||
});
|
||||
});
|
Reference in a new issue