diff options
Diffstat (limited to 'share/www')
-rw-r--r-- | share/www/script/couch.js | 2 | ||||
-rw-r--r-- | share/www/script/test/changes.js | 7 | ||||
-rw-r--r-- | share/www/script/test/cookie_auth.js | 6 |
3 files changed, 12 insertions, 3 deletions
diff --git a/share/www/script/couch.js b/share/www/script/couch.js index 9f0995ff..f7d7d43d 100644 --- a/share/www/script/couch.js +++ b/share/www/script/couch.js @@ -496,4 +496,4 @@ CouchDB.params = function(options) { returnArray.push(key + "=" + value); } return returnArray.join("&"); -} +}; diff --git a/share/www/script/test/changes.js b/share/www/script/test/changes.js index f348aed8..bf4a1617 100644 --- a/share/www/script/test/changes.js +++ b/share/www/script/test/changes.js @@ -57,7 +57,12 @@ couchTests.changes = function(debug) { } // poor man's browser detection - var is_safari = navigator.userAgent.match(/AppleWebKit/); + var is_safari = false; + if(typeof(navigator) == "undefined") { + is_safari = true; // For CouchHTTP based runners + } else if(navigator.userAgent.match(/AppleWebKit/)) { + is_safari = true; + }; if (!is_safari && xhr) { // Only test the continuous stuff if we have a real XHR object // with real async support. diff --git a/share/www/script/test/cookie_auth.js b/share/www/script/test/cookie_auth.js index d82d302a..0a42b4a9 100644 --- a/share/www/script/test/cookie_auth.js +++ b/share/www/script/test/cookie_auth.js @@ -94,7 +94,11 @@ couchTests.cookie_auth = function(debug) { body: "username=Jason%20Davies&password="+encodeURIComponent(password) }); // should this be a redirect code instead of 200? - T(xhr.status == 200); + // The cURL adapter is returning the expected 302 here. + // I imagine this has to do with whether the client is willing + // to follow the redirect, ie, the browser follows and does a + // GET on the returned Location + T(xhr.status == 200 || xhr.status == 302); usersDb.deleteDb(); // test user creation |