aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Blott2014-11-06 09:01:22 +0000
committerStephen Blott2014-11-06 09:01:22 +0000
commitbbea4b123fe9da0511b1698f07868c27299ae24f (patch)
treeefc3f1546dc1cbcc2a30e22e45e67f122388e39f /tests
parent7f4eb88ea2d79e670c4383120fb5e1ac139e2778 (diff)
downloadvimium-bbea4b123fe9da0511b1698f07868c27299ae24f.tar.bz2
Add (initial, basic) isUrl tests (more needed).
Diffstat (limited to 'tests')
-rw-r--r--tests/unit_tests/utils_test.coffee7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit_tests/utils_test.coffee b/tests/unit_tests/utils_test.coffee
index b2d656ab..556f5b7a 100644
--- a/tests/unit_tests/utils_test.coffee
+++ b/tests/unit_tests/utils_test.coffee
@@ -61,6 +61,13 @@ context "hasChromePrefix",
assert.isFalse Utils.hasChromePrefix "data"
assert.isFalse Utils.hasChromePrefix "data :foobar"
+context "isUrl",
+ should "identify URLs as URLs", ->
+ assert.isTrue Utils.isUrl "http://www.example.com/blah"
+
+ should "identify non-URLs and non-URLs", ->
+ assert.isFalse Utils.isUrl "http://www.example.com/ blah"
+
context "Function currying",
should "Curry correctly", ->
foo = (a, b) -> "#{a},#{b}"