summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2011-02-14 20:00:25 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2011-02-14 20:00:25 +0000
commitdbefb6bc9c675e7b155c171ef88a1a5fc97f40b7 (patch)
treee75a0cd8c18463a2dbe7a135a8527e9e1a68a6e4 /share
parentf8b7288dce60a15136583483b533eb9a7c101b64 (diff)
Merged revision 1070625 from trunk:
_all_docs rows must not deleted include documents After COUCHDB-1061, when POSTing to _all_docs?include_docs=true with the body "keys" option, deleted documents were part part of the output. The "doc" property of each _all_docs row should have the value 'null' for all deleted documents (when ?include_docs=true). A test was added to help prevent this from happening again. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1070631 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-rw-r--r--share/www/script/test/all_docs.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/share/www/script/test/all_docs.js b/share/www/script/test/all_docs.js
index 910d4462..4324e3bb 100644
--- a/share/www/script/test/all_docs.js
+++ b/share/www/script/test/all_docs.js
@@ -86,6 +86,13 @@ couchTests.all_docs = function(debug) {
T(changes.results[2].doc);
T(changes.results[2].doc._deleted);
+ rows = db.allDocs({include_docs: true}, ["1"]).rows;
+ TEquals(1, rows.length);
+ TEquals("1", rows[0].key);
+ TEquals("1", rows[0].id);
+ TEquals(true, rows[0].value.deleted);
+ TEquals(null, rows[0].doc);
+
// add conflicts
var conflictDoc1 = {
_id: "3", _rev: "2-aa01552213fafa022e6167113ed01087", value: "X"