diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-08 15:19:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-08 15:19:25 +0900 |
commit | 0183161145d36cbafb7dbd86ca3a1aac6faca43f (patch) | |
tree | aed757bfb5f8789156439d1e1fdff4e221376aaa /test/settings/reducers/setting.test.js | |
parent | 0f54a203dba38acdd080a928cee95f875fe84706 (diff) | |
parent | 57f798044d32ba7f9dc10a34ac31ad5dbdbf56ae (diff) |
Merge pull request #22 from ueokande/separate-domains
Refactor: Separate domains
Diffstat (limited to 'test/settings/reducers/setting.test.js')
-rw-r--r-- | test/settings/reducers/setting.test.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/settings/reducers/setting.test.js b/test/settings/reducers/setting.test.js new file mode 100644 index 0000000..0e84247 --- /dev/null +++ b/test/settings/reducers/setting.test.js @@ -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', + }); + }); +}); |