Skip to content

Commit

Permalink
Remove console.log() statements from test
Browse files Browse the repository at this point in the history
  • Loading branch information
fdmanana committed Jan 5, 2012
1 parent 6cf3e09 commit 99c3467
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions share/www/script/test/users_db_security.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ couchTests.users_db_security = function(debug) {
}; };
var username1 = username.replace(/[0-9]$/, ""); var username1 = username.replace(/[0-9]$/, "");
var password = pws[username]; var password = pws[username];
//console.log("Logging in '" + username1 + "' with password '" + password + "'");
T(CouchDB.login(username1, pws[username]).ok); T(CouchDB.login(username1, pws[username]).ok);
}; };


Expand Down Expand Up @@ -80,7 +79,6 @@ couchTests.users_db_security = function(debug) {
// jan's gonna be admin as he's the first user // jan's gonna be admin as he's the first user
TEquals(true, usersDb.save(userDoc).ok, "should save document"); TEquals(true, usersDb.save(userDoc).ok, "should save document");
userDoc = usersDb.open("org.couchdb.user:jchris"); userDoc = usersDb.open("org.couchdb.user:jchris");
console.log(userDoc);
TEquals(undefined, userDoc.password, "password field should be null 1"); TEquals(undefined, userDoc.password, "password field should be null 1");
TEquals(40, userDoc.password_sha.length, "password_sha should exist"); TEquals(40, userDoc.password_sha.length, "password_sha should exist");
TEquals(32, userDoc.salt.length, "salt should exist"); TEquals(32, userDoc.salt.length, "salt should exist");
Expand Down Expand Up @@ -191,13 +189,11 @@ couchTests.users_db_security = function(debug) {
TEquals("forbidden", e.error, "non-admins can't read design docs"); TEquals("forbidden", e.error, "non-admins can't read design docs");
} }


console.log(fdmananaDoc);
// admin should be able to read and edit any user doc // admin should be able to read and edit any user doc
fdmananaDoc.password = "mobile"; fdmananaDoc.password = "mobile";
var result = save_as(usersDb, fdmananaDoc, "jan"); var result = save_as(usersDb, fdmananaDoc, "jan");
TEquals(true, result.ok, "admin should be able to update any user doc"); TEquals(true, result.ok, "admin should be able to update any user doc");


console.log(fdmananaDoc);
// admin should be able to read and edit any user doc // admin should be able to read and edit any user doc
fdmananaDoc.password = "mobile1"; fdmananaDoc.password = "mobile1";
var result = save_as(usersDb, fdmananaDoc, "benoitc"); var result = save_as(usersDb, fdmananaDoc, "benoitc");
Expand Down

0 comments on commit 99c3467

Please sign in to comment.