diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-09 15:30:05 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-09 15:30:05 +0900 |
commit | c913dcdec775094daa9a64fa40034b3122320660 (patch) | |
tree | 978f2ad2581bc069e9369b28fe743b91c09f18a3 /test/settings/reducers | |
parent | 355c0c64575adad4886647a1df3da173598b558b (diff) |
parse json in settings
Diffstat (limited to 'test/settings/reducers')
-rw-r--r-- | test/settings/reducers/setting.test.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/settings/reducers/setting.test.js b/test/settings/reducers/setting.test.js index 0e84247..3468d4b 100644 --- a/test/settings/reducers/setting.test.js +++ b/test/settings/reducers/setting.test.js @@ -5,18 +5,18 @@ 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', {}); + expect(state).to.have.deep.property('json', ''); + expect(state).to.have.deep.property('value', {}); }); it('return next state for SETTING_SET_SETTINGS', () => { let action = { type: actions.SETTING_SET_SETTINGS, - settings: { value1: 'hello', value2: 'world' }, + json: '{ "key": "value" }', + value: { key: 123 }, }; let state = settingReducer(undefined, action); - expect(state).to.have.deep.property('settings', { - value1: 'hello', - value2: 'world', - }); + expect(state).to.have.deep.property('json', '{ "key": "value" }'); + expect(state).to.have.deep.property('value', { key: 123 }); }); }); |