From bbea4b123fe9da0511b1698f07868c27299ae24f Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Thu, 6 Nov 2014 09:01:22 +0000 Subject: Add (initial, basic) isUrl tests (more needed). --- tests/unit_tests/utils_test.coffee | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/unit_tests') 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}" -- cgit v1.2.3