From 159ce7f416c430137b2b71f0ef6ffbb6a5c8f2ec Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Mon, 14 Sep 2009 20:20:50 +0000 Subject: finish committing my changes adventure. pardon the dust. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@814828 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/all_docs.js | 3 +-- share/www/script/test/replication.js | 4 ++-- share/www/script/test/view_include_docs.js | 10 ++++++---- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'share/www/script') diff --git a/share/www/script/test/all_docs.js b/share/www/script/test/all_docs.js index 34c20921..ab443605 100644 --- a/share/www/script/test/all_docs.js +++ b/share/www/script/test/all_docs.js @@ -65,8 +65,7 @@ couchTests.all_docs = function(debug) { // the deletion should make doc id 1 have the last seq num T(changes.results.length == 4); T(changes.results[3].id == "1"); - // we've removed deletions from the changes feed as they are on the doc record not the doc_info - T(!changes.results[3].deleted); + T(changes.results[3].deleted); // do an update var doc2 = db.open("3"); diff --git a/share/www/script/test/replication.js b/share/www/script/test/replication.js index c08d128b..210ffa2c 100644 --- a/share/www/script/test/replication.js +++ b/share/www/script/test/replication.js @@ -100,12 +100,12 @@ couchTests.replication = function(debug) { }; this.afterAB1 = function(dbA, dbB) { - var rows = dbB.changes({include_docs:true}).results; + var rows = dbB.changes().results; var rowCnt = 0; for (var i=0; i < rows.length; i++) { if (rows[i].id == "del1") { rowCnt += 1; - T(rows[i].doc._deleted == true); + T(rows[i].deleted == true); } }; T(rowCnt == 1); diff --git a/share/www/script/test/view_include_docs.js b/share/www/script/test/view_include_docs.js index 9405112d..8d50784d 100644 --- a/share/www/script/test/view_include_docs.js +++ b/share/www/script/test/view_include_docs.js @@ -87,11 +87,13 @@ couchTests.view_include_docs = function(debug) { // Check emitted _rev controls things resp = db.allDocs({include_docs: true}, ["0"]); var before = resp.rows[0].doc; + var after = db.open("0"); - after.integer = 100 + after.integer = 100; after.prev = after._rev; - db.save(after); - after = db.open("0"); + T(db.save(after).ok); + + var after = db.open("0"); T(after._rev != after.prev); T(after.integer == 100); @@ -111,6 +113,6 @@ couchTests.view_include_docs = function(debug) { T(resp.rows[0].key == "0"); T(resp.rows[0].id == "0"); T(!resp.rows[0].doc); - T(resp.rows[0].error == "missing"); + T(resp.rows[0].doc == null); T(resp.rows[1].doc.integer == 23); }; -- cgit v1.2.3