summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-03-21 14:42:44 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-03-21 14:42:44 +0000
commite397d301ca0e853bcad3c6964060a7f55dd799bf (patch)
tree36f84a4363b36869723e2d041ca5734f3a83c0bd /share/www/script
parent17266b0581a214315ebf8ce7454ef9f73fc2a02a (diff)
regression test for update/delete in one bulk_docs update
closes COUCHDB-172 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@756953 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script')
-rw-r--r--share/www/script/test/bulk_docs.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/share/www/script/test/bulk_docs.js b/share/www/script/test/bulk_docs.js
index 0b406a3e..8e73ded4 100644
--- a/share/www/script/test/bulk_docs.js
+++ b/share/www/script/test/bulk_docs.js
@@ -88,4 +88,13 @@ couchTests.bulk_docs = function(debug) {
T(results[0].id != "");
T(results[0].rev != "");
+
+
+ // Regression test for failure on update/delete
+ var newdoc = {"_id": "foobar", "body": "baz"};
+ T(db.save(newdoc).ok);
+ update = {"_id": newdoc._id, "_rev": newdoc._rev, "body": "blam"};
+ torem = {"_id": newdoc._id, "_rev": newdoc._rev, "_deleted": true};
+ results = db.bulkSave([update, torem]);
+ T(results[1].error == "conflict");
};