From e397d301ca0e853bcad3c6964060a7f55dd799bf Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Sat, 21 Mar 2009 14:42:44 +0000 Subject: 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 --- share/www/script/test/bulk_docs.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'share') 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"); }; -- cgit v1.2.3