diff options
Diffstat (limited to 'share/www/script/test/basics.js')
-rw-r--r-- | share/www/script/test/basics.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/share/www/script/test/basics.js b/share/www/script/test/basics.js index 6a3ae471..5b608b84 100644 --- a/share/www/script/test/basics.js +++ b/share/www/script/test/basics.js @@ -37,9 +37,9 @@ couchTests.basics = function(debug) { TEquals(dbname, xhr.getResponseHeader("Location").substr(-dbname.length), "should return Location header to newly created document"); - - TEquals("http://", - xhr.getResponseHeader("Location").substr(0, 7), + var expected = window.location.protocol + "//"; + TEquals(expected, + xhr.getResponseHeader("Location").substr(0, expected.length), "should return absolute Location header to newly created document"); }); @@ -181,9 +181,9 @@ couchTests.basics = function(debug) { TEquals("/test_suite_db/newdoc", xhr.getResponseHeader("Location").substr(-21), "should return Location header to newly created document"); - - TEquals("http://", - xhr.getResponseHeader("Location").substr(0, 7), + var expected = window.location.protocol + "//"; + TEquals(expected, + xhr.getResponseHeader("Location").substr(0, expected.length), "should return absolute Location header to newly created document"); // deleting a non-existent doc should be 404 |