diff options
| author | Stephen Blott | 2014-09-05 10:59:20 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2014-09-06 12:28:40 +0100 | 
| commit | 643e49aa3109b9a25b38ce5d6b59bb11bc6337b1 (patch) | |
| tree | fcbfa9c0fe1a2a9e598ff9735301c8eb6c2913ae /tests | |
| parent | 2f27d4590ba30f5a443aedff12d9611a83a4f771 (diff) | |
| download | vimium-643e49aa3109b9a25b38ce5d6b59bb11bc6337b1.tar.bz2 | |
Structured passkeys; changes following code review; major rewrite of options.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit_tests/exclusion_test.coffee | 13 | 
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/unit_tests/exclusion_test.coffee b/tests/unit_tests/exclusion_test.coffee index 7fb63df9..a24c3b67 100644 --- a/tests/unit_tests/exclusion_test.coffee +++ b/tests/unit_tests/exclusion_test.coffee @@ -15,7 +15,6 @@ root.Marks =  extend(global, require "../../lib/utils.js")  Utils.getCurrentVersion = -> '1.44'  extend(global,require "../../background_scripts/sync.js") -extend(global, require "../../lib/exclusion_rule.js")  extend(global,require "../../background_scripts/settings.js")  Sync.init()  extend(global, require "../../background_scripts/exclusions.js") @@ -34,9 +33,13 @@ context "Excluded URLs and pass keys",      assert.isFalse rule.passKeys    should "be enabled, but with pass keys", -> -    rule = isEnabledForUrl({ url: 'https://mail.google.com/mail/u/0/#inbox' }) +    rule = isEnabledForUrl({ url: 'https://www.facebook.com/something' })      assert.isTrue rule.isEnabledForUrl -    assert.equal rule.passKeys, 'jk' +    assert.isFalse rule.passKeys +    addExclusionRule("http*://www.facebook.com/*","oO") +    rule = isEnabledForUrl({ url: 'https://www.facebook.com/something' }) +    assert.isTrue rule.isEnabledForUrl +    assert.equal rule.passKeys, 'oO'    should "be enabled", ->      rule = isEnabledForUrl({ url: 'http://www.twitter.com/pages' }) @@ -61,8 +64,8 @@ context "Excluded URLs and pass keys",    should "update an existing excluded URL with passkeys", ->      rule = isEnabledForUrl({ url: 'http://mail.google.com/page' }) -    assert.isTrue rule.isEnabledForUrl -    assert.equal rule.passKeys, 'jk' +    assert.isFalse rule.isEnabledForUrl +    assert.isFalse rule.passKeys      addExclusionRule("http*://mail.google.com/*","jknp")      rule = isEnabledForUrl({ url: 'http://mail.google.com/page' })      assert.isTrue rule.isEnabledForUrl  | 
