summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-06-05 21:59:53 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-06-05 21:59:53 +0000
commitcec0ef2ac1d2ecb5e2153f2415cb947fadeb42e0 (patch)
treeb54a4c9a581e6e9afc986d71c09a826e559ad0e3 /share
parente9970e71045eb9ea34976e24c287c729708f773d (diff)
update_seq is only in view response when update_seq=true is in query params
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@951776 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-rw-r--r--share/www/script/test/view_update_seq.js26
1 files changed, 17 insertions, 9 deletions
diff --git a/share/www/script/test/view_update_seq.js b/share/www/script/test/view_update_seq.js
index 3935e153..cfda1a87 100644
--- a/share/www/script/test/view_update_seq.js
+++ b/share/www/script/test/view_update_seq.js
@@ -11,7 +11,7 @@
// the License.
couchTests.view_update_seq = function(debug) {
- var db = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"false"});
+ var db = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"true"});
db.deleteDb();
db.createDb();
if (debug) debugger;
@@ -35,7 +35,7 @@ couchTests.view_update_seq = function(debug) {
T(db.info().update_seq == 1);
- var resp = db.allDocs({});
+ var resp = db.allDocs({update_seq:true});
T(resp.rows.length == 1);
T(resp.update_seq == 1);
@@ -45,32 +45,40 @@ couchTests.view_update_seq = function(debug) {
resp = db.allDocs({limit: 1});
T(resp.rows.length == 1);
+ T(!resp.update_seq, "all docs");
+
+ resp = db.allDocs({limit: 1, update_seq:true});
+ T(resp.rows.length == 1);
T(resp.update_seq == 101);
- resp = db.view('test/all_docs', {limit: 1});
+ resp = db.view('test/all_docs', {limit: 1, update_seq:true});
T(resp.rows.length == 1);
T(resp.update_seq == 101);
- resp = db.view('test/summate', {});
+ resp = db.view('test/all_docs', {limit: 1, update_seq:false});
+ T(resp.rows.length == 1);
+ T(!resp.update_seq, "view");
+
+ resp = db.view('test/summate', {update_seq:true});
T(resp.rows.length == 1);
T(resp.update_seq == 101);
db.save({"id":"0"});
- resp = db.view('test/all_docs', {limit: 1,stale: "ok"});
+ resp = db.view('test/all_docs', {limit: 1,stale: "ok", update_seq:true});
T(resp.rows.length == 1);
T(resp.update_seq == 101);
- resp = db.view('test/all_docs', {limit: 1});
+ resp = db.view('test/all_docs', {limit: 1, update_seq:true});
T(resp.rows.length == 1);
T(resp.update_seq == 102);
- resp = db.view('test/all_docs',{},["0","1"]);
+ resp = db.view('test/all_docs',{update_seq:true},["0","1"]);
T(resp.update_seq == 102);
- resp = db.view('test/all_docs',{},["0","1"]);
+ resp = db.view('test/all_docs',{update_seq:true},["0","1"]);
T(resp.update_seq == 102);
- resp = db.view('test/summate',{group:true},["0","1"]);
+ resp = db.view('test/summate',{group:true, update_seq:true},["0","1"]);
T(resp.update_seq == 102);
};