diff options
| author | Stephen Blott | 2014-04-19 08:08:03 +0100 |
|---|---|---|
| committer | Stephen Blott | 2014-04-19 08:08:03 +0100 |
| commit | 64f290465aa14478200dc266ccc68b3475352e69 (patch) | |
| tree | 6d6f9e99f66ead716e46b1461a444988ba2d8adb | |
| parent | 8e0bb0a5c749cfae9586dd797d96a0f6233f828c (diff) | |
| download | vimium-64f290465aa14478200dc266ccc68b3475352e69.tar.bz2 | |
Add tests for sync.
| -rw-r--r-- | tests/unit_tests/settings_test.coffee | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit_tests/settings_test.coffee b/tests/unit_tests/settings_test.coffee index 36a54f11..57766c12 100644 --- a/tests/unit_tests/settings_test.coffee +++ b/tests/unit_tests/settings_test.coffee @@ -30,3 +30,15 @@ context "settings", Settings.set 'scrollStepSize', 20 Settings.clear 'scrollStepSize' assert.equal Settings.get('scrollStepSize'), 60 + + should "remote changes take effect locally, non-default value", -> + Settings.set 'scrollStepSize', 20 + assert.equal Settings.get('scrollStepSize'), 20 + Sync.listener { scrollStepSize: { newValue: "40" } } + assert.equal Settings.get('scrollStepSize'), 40 + + should "remote changes take effect locally, default value", -> + Settings.set 'scrollStepSize', 20 + assert.equal Settings.get('scrollStepSize'), 20 + Sync.listener { scrollStepSize: { newValue: "60" } } + assert.isFalse Settings.has 'scrollStepSize' |
