summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
authorBenoit Chesneau <benoitc@apache.org>2010-03-28 09:10:51 +0000
committerBenoit Chesneau <benoitc@apache.org>2010-03-28 09:10:51 +0000
commitef7ab7e4e414d53fe5c12993d29b193ed3cdfd42 (patch)
treeeac9b8e983cddb4d5ffef784de368e6d001b2e03 /share/www/script
parented7e7c686fae7f1d2e3f149c2f2ed8854c4f95c8 (diff)
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
Diffstat (limited to 'share/www/script')
-rw-r--r--share/www/script/test/update_documents.js4
1 files changed, 4 insertions, 0 deletions
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