summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2008-11-25 02:47:39 +0000
committerJohn Christopher Anderson <jchris@apache.org>2008-11-25 02:47:39 +0000
commite44d37584e07fccf739e317cc8b0a6905e2ced56 (patch)
treebb81b83b65f481d9e7cff5f30fe15c0ad352c123 /share/www
parenta7874fd49ee787779bac6ab0624f5baeaac6b4d9 (diff)
_all_docs_by_seq works with descending=true
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@720384 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/couch_tests.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js
index 7f392271..47519a02 100644
--- a/share/www/script/couch_tests.js
+++ b/share/www/script/couch_tests.js
@@ -171,6 +171,14 @@ var tests = {
T(row.id == ids[i]);
};
+ // it should work in reverse as well
+ all_seq = db.allDocsBySeq({descending:true});
+ ids = ["2","1","3","0"];
+ for (var i=0; i < all_seq.rows.length; i++) {
+ var row = all_seq.rows[i];
+ T(row.id == ids[i]);
+ };
+
// check that deletions also show up right
var doc1 = db.open("1");
var deleted = db.deleteDoc(doc1);