diff options
Diffstat (limited to 'test_harnesses/automated.html')
| -rw-r--r-- | test_harnesses/automated.html | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/test_harnesses/automated.html b/test_harnesses/automated.html index 5e3ae93c..764b0d2f 100644 --- a/test_harnesses/automated.html +++ b/test_harnesses/automated.html @@ -250,6 +250,19 @@        ); +      context("Web query parsing", + +        should("Convert query string to valid URL", function() { +          assert.equal("http://www.google.com/", utils.ensureUrl("http://www.google.com/")); +          assert.equal("http://www.google.com/", utils.ensureUrl("    http://www.google.com/     ")); +          assert.equal("http://www.google.com", utils.ensureUrl("www.google.com")); +          assert.equal("http://google.com", utils.ensureUrl("google.com")); +          assert.equal("http://www.google.com/search?q=google", utils.ensureUrl("google")); +          assert.equal("http://www.google.com/search?q=go ogle.com", utils.ensureUrl("go ogle.com")); +        }) + +      ); +        Tests.outputMethod = function(output) {          var newOutput = Array.prototype.join.call(arguments, "\n");          newOutput = newOutput.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"); // escape html | 
