From 627b7d2d90c7cfcec2c8bb6e5b5e2b53ea60d217 Mon Sep 17 00:00:00 2001 From: Paul Joseph Davis Date: Thu, 26 Nov 2009 19:32:08 +0000 Subject: Setup JavaScript command line runner. All JS tests can now be run from the command line using the cURL adapter. In the future I would like to rework this and provide better TAP output. For now, each test is a single TAP assert. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@884675 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/cookie_auth.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'share/www/script/test/cookie_auth.js') 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 -- cgit v1.2.3