summaryrefslogtreecommitdiff
path: root/share/www/script/test/proxyauth.js
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-11-18 13:27:21 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-11-18 13:27:21 +0000
commit19c1bd388cfdbd8954f43ac48fb25af637b7e07c (patch)
treee92d94bf38e090aed4c00a65b1253c9a13ff42c0 /share/www/script/test/proxyauth.js
parent9d2d40f25da4f62f4d68172e2c62b4a6eb01e531 (diff)
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
Diffstat (limited to 'share/www/script/test/proxyauth.js')
-rw-r--r--share/www/script/test/proxyauth.js13
1 files changed, 6 insertions, 7 deletions
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"}
});