From 89d0b4600cc80cb507b513c4b76af9c1eb60fb22 Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Tue, 27 Jul 2010 11:02:36 +0000 Subject: fix CLI js test suite. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@979642 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/basics.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'share/www/script/test/basics.js') diff --git a/share/www/script/test/basics.js b/share/www/script/test/basics.js index 5b608b84..f0792a1e 100644 --- a/share/www/script/test/basics.js +++ b/share/www/script/test/basics.js @@ -37,9 +37,8 @@ couchTests.basics = function(debug) { TEquals(dbname, xhr.getResponseHeader("Location").substr(-dbname.length), "should return Location header to newly created document"); - var expected = window.location.protocol + "//"; - TEquals(expected, - xhr.getResponseHeader("Location").substr(0, expected.length), + TEquals(CouchDB.protocol, + xhr.getResponseHeader("Location").substr(0, CouchDB.protocol.length), "should return absolute Location header to newly created document"); }); @@ -181,9 +180,8 @@ couchTests.basics = function(debug) { TEquals("/test_suite_db/newdoc", xhr.getResponseHeader("Location").substr(-21), "should return Location header to newly created document"); - var expected = window.location.protocol + "//"; - TEquals(expected, - xhr.getResponseHeader("Location").substr(0, expected.length), + TEquals(CouchDB.protocol, + xhr.getResponseHeader("Location").substr(0, CouchDB.protocol.length), "should return absolute Location header to newly created document"); // deleting a non-existent doc should be 404 -- cgit v1.2.3