From 19c1bd388cfdbd8954f43ac48fb25af637b7e07c Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Thu, 18 Nov 2010 13:27:21 +0000 Subject: Merged revisions 986710, 988909, 997862, 998090, 1005513 and 1036447 from trunk to make the JavaScript test suite work as well on Chrome/Chromium and Safari. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@1036449 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/proxyauth.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'share/www/script/test/proxyauth.js') diff --git a/share/www/script/test/proxyauth.js b/share/www/script/test/proxyauth.js index 171eef37..91e2f221 100644 --- a/share/www/script/test/proxyauth.js +++ b/share/www/script/test/proxyauth.js @@ -39,7 +39,7 @@ couchTests.proxyauth = function(debug) { db.createDb(); var benoitcUserDoc = CouchDB.prepareUserDoc({ - name: "benoitc@apache.org", + name: "benoitc@apache.org" }, "test"); T(usersDb.save(benoitcUserDoc).ok); @@ -56,7 +56,7 @@ couchTests.proxyauth = function(debug) { CouchDB.logout(); - headers = { + var headers = { "X-Auth-CouchDB-UserName": "benoitc@apache.org", "X-Auth-CouchDB-Roles": "test", "X-Auth-CouchDB-Token": hex_hmac_sha1(secret, "benoitc@apache.org") @@ -72,14 +72,13 @@ couchTests.proxyauth = function(debug) { }), "role": stringFun(function(doc, req) { return req.userCtx['roles'][0]; - }), + }) } - - } + }; db.save(designDoc); - req = CouchDB.request("GET", "/test_suite_db/_design/test/_show/welcome", + var req = CouchDB.request("GET", "/test_suite_db/_design/test/_show/welcome", {headers: headers}); T(req.responseText == "Welcome benoitc@apache.org"); @@ -87,7 +86,7 @@ couchTests.proxyauth = function(debug) { {headers: headers}); T(req.responseText == "test"); - xhr = CouchDB.request("PUT", "/_config/couch_httpd_auth/proxy_use_secret",{ + var xhr = CouchDB.request("PUT", "/_config/couch_httpd_auth/proxy_use_secret",{ body : JSON.stringify("true"), headers: {"X-Couch-Persist": "false"} }); -- cgit v1.2.3