From b727a764be6d7ff9fe367cc6b317c4fc7f1baba3 Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Thu, 30 Jun 2011 13:04:39 +0000 Subject: COUCHDB-1206 - include current_seq in view ETag for include_docs=true git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1141522 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/etags_views.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'share/www/script/test') diff --git a/share/www/script/test/etags_views.js b/share/www/script/test/etags_views.js index f556d6ac..6d8e97b8 100644 --- a/share/www/script/test/etags_views.js +++ b/share/www/script/test/etags_views.js @@ -70,6 +70,14 @@ couchTests.etags_views = function(debug) { xhr = CouchDB.request("GET", "/test_suite_db/_design/etags/_view/basicView"); var etag1 = xhr.getResponseHeader("etag"); T(etag1 == etag); + + // verify ETag always changes for include_docs=true on update + xhr = CouchDB.request("GET", "/test_suite_db/_design/etags/_view/basicView?include_docs=true"); + var etag1 = xhr.getResponseHeader("etag"); + T(db.save({"_id":"doc2", "foo":"bar"}).ok); + xhr = CouchDB.request("GET", "/test_suite_db/_design/etags/_view/basicView?include_docs=true"); + var etag2 = xhr.getResponseHeader("etag"); + T(etag1 != etag2); // Verify that purges affect etags xhr = CouchDB.request("GET", "/test_suite_db/_design/etags/_view/fooView"); -- cgit v1.2.3