aboutsummaryrefslogtreecommitdiff
path: root/test/background/reducers/setting.test.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-01-10 21:34:40 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-01-10 21:34:40 +0900
commit22c34a0a6f9721fb9d907ab10de91cbbc40d6bbe (patch)
tree5a09df3bef405e526d961adff5e40e9db983a234 /test/background/reducers/setting.test.js
parent6083e70ea089fa2683741a1118be0e4e6b76f858 (diff)
add set property action in background
Diffstat (limited to 'test/background/reducers/setting.test.js')
-rw-r--r--test/background/reducers/setting.test.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/background/reducers/setting.test.js b/test/background/reducers/setting.test.js
index a6a5573..2ef98cb 100644
--- a/test/background/reducers/setting.test.js
+++ b/test/background/reducers/setting.test.js
@@ -16,4 +16,22 @@ describe("setting reducer", () => {
let state = settingReducer(undefined, action);
expect(state).to.have.deep.property('value', { key: 123 });
});
+
+ it('return next state for SETTING_SET_PROPERTY', () => {
+ let state = {
+ value: {
+ properties: { smoothscroll: true }
+ }
+ }
+ let action = {
+ type: actions.SETTING_SET_PROPERTY,
+ name: 'encoding',
+ value: 'utf-8',
+ };
+ state = settingReducer(state, action);
+
+ console.log(state);
+ expect(state.value.properties).to.have.property('smoothscroll', true);
+ expect(state.value.properties).to.have.property('encoding', 'utf-8');
+ });
});