From ef7ab7e4e414d53fe5c12993d29b193ed3cdfd42 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Sun, 28 Mar 2010 09:10:51 +0000 Subject: allows client to retrieve the revision of document updated via _update, by providing it in headers. Header is named "X-Couch-Update-NewRev. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@928361 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/update_documents.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'share') diff --git a/share/www/script/test/update_documents.js b/share/www/script/test/update_documents.js index c7bd05b1..a8ec5901 100644 --- a/share/www/script/test/update_documents.js +++ b/share/www/script/test/update_documents.js @@ -135,7 +135,11 @@ couchTests.update_documents = function(debug) { headers : {"X-Couch-Full-Commit":"true"} }); + var NewRev = xhr.getResponseHeader("X-Couch-Update-NewRev"); doc = db.open(docid); + T(doc['_rev'] == NewRev); + + T(doc.counter == 2); // parse xml -- cgit v1.2.3