summaryrefslogtreecommitdiff
path: root/test/javascript/tests/users_db.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/javascript/tests/users_db.js')
-rw-r--r--test/javascript/tests/users_db.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/test/javascript/tests/users_db.js b/test/javascript/tests/users_db.js
index 20be325ca..7d9682185 100644
--- a/test/javascript/tests/users_db.js
+++ b/test/javascript/tests/users_db.js
@@ -68,14 +68,13 @@ couchTests.users_db = function(debug) {
CouchDB.logout();
// ok, now create a conflicting edit on the jchris doc, and make sure there's no login.
- // (use replication to create the conflict) - need 2 be admin
CouchDB.login("jan", "apple");
- CouchDB.replicate(usersDb.name, usersDbAlt.name);
- // save in one DB
+ // save using new_edits=false
var jchrisUser2 = JSON.parse(JSON.stringify(jchrisUserDoc));
jchrisUser2.foo = "bar";
+ jchrisUser2._rev = "1-7a28b8e96ee17f723ebc1e9f89640783";
- T(usersDb.save(jchrisUser2).ok);
+ T(usersDb.save(jchrisUser2, {new_edits: false}).ok);
try {
usersDb.save(jchrisUserDoc);
T(false && "should be an update conflict");
@@ -83,12 +82,6 @@ couchTests.users_db = function(debug) {
T(true);
}
- // then in the other
- var jchrisUser3 = JSON.parse(JSON.stringify(jchrisUserDoc));
- jchrisUser3.foo = "barrrr";
- T(usersDbAlt.save(jchrisUser3).ok);
- CouchDB.replicate(usersDbAlt.name, usersDb.name); // now we should have a conflict
-
var jchrisWithConflict = usersDb.open(jchrisUserDoc._id, {conflicts : true});
T(jchrisWithConflict._conflicts.length == 1);
CouchDB.logout();