From e44d37584e07fccf739e317cc8b0a6905e2ced56 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Tue, 25 Nov 2008 02:47:39 +0000 Subject: _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 --- share/www/script/couch_tests.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'share') 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); -- cgit v1.2.3