aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Blott2014-04-19 11:07:30 +0100
committerStephen Blott2014-04-19 11:07:30 +0100
commitb8c501ee2e4f85ef8307ec27f39ea98fe0779a6c (patch)
treef864350f38ba6a98c25700941f321ec6d8275a43 /tests
parent222d53fe43e34d8d2fd7c2fd859de53cf5fee1f3 (diff)
downloadvimium-b8c501ee2e4f85ef8307ec27f39ea98fe0779a6c.tar.bz2
Test that all stored settings are JSONified.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit_tests/settings_test.coffee4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unit_tests/settings_test.coffee b/tests/unit_tests/settings_test.coffee
index 4b6f3498..5d24c7f2 100644
--- a/tests/unit_tests/settings_test.coffee
+++ b/tests/unit_tests/settings_test.coffee
@@ -13,6 +13,10 @@ context "settings",
setup ->
stub global, 'localStorage', {}
+ should "all settings stored in localStorage must be JSONified strings", ->
+ Settings.set 'dummy', ""
+ assert.equal localStorage.dummy, '""'
+
should "obtain defaults if no key is stored", ->
assert.isFalse Settings.has 'scrollStepSize'
assert.equal Settings.get('scrollStepSize'), 60