From 8aa6073aebb7dea9d11aba1d0d07c89b161c508c Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 17 May 2015 14:12:32 +0100 Subject: use a less brittle approach to decoding URIs (fix tests). --- tests/unit_tests/utils_test.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/unit_tests') diff --git a/tests/unit_tests/utils_test.coffee b/tests/unit_tests/utils_test.coffee index 829c7042..d1444af2 100644 --- a/tests/unit_tests/utils_test.coffee +++ b/tests/unit_tests/utils_test.coffee @@ -68,11 +68,11 @@ context "hasJavascriptPrefix", assert.isTrue Utils.hasJavascriptPrefix "javascript:foobar" assert.isFalse Utils.hasJavascriptPrefix "http:foobar" -context "decodeJavascriptURI", +context "decodeURIByParts", should "decode javascript: URLs", -> - assert.equal "foobar", Utils.decodeJavascriptURI "foobar" - assert.equal " ", Utils.decodeJavascriptURI "%20" - assert.equal "25 % 20 25 ", Utils.decodeJavascriptURI "25 % 20 25%20" + assert.equal "foobar", Utils.decodeURIByParts "foobar" + assert.equal " ", Utils.decodeURIByParts "%20" + assert.equal "25 % 20 25 ", Utils.decodeURIByParts "25 % 20 25%20" context "isUrl", should "identify URLs as URLs", -> -- cgit v1.2.3