summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-03-05 19:47:25 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-03-05 19:47:25 +0000
commite8ca9805f1ea6fb13cb7255ea90b127ac3b8201f (patch)
tree8868421cfd545f3bba2ff3d83e83aaf8fcd04d78 /share/www
parent85323384336056cd500ac628c5a69d55635b3de6 (diff)
allow multi-key POST requests for _list.
closes COUCHDB-269. thanks Jason Davies git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@750565 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/test/list_views.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/share/www/script/test/list_views.js b/share/www/script/test/list_views.js
index 5469efd2..6ebd159e 100644
--- a/share/www/script/test/list_views.js
+++ b/share/www/script/test/list_views.js
@@ -257,4 +257,23 @@ couchTests.list_views = function(debug) {
xhr = CouchDB.request("GET", "/test_suite_db/_list/lists/emptyList/withReduce?group=true");
T(xhr.responseText.match(/^$/));
+ // multi-key fetch
+ var xhr = CouchDB.request("POST", "/test_suite_db/_list/lists/simpleForm/basicView", {
+ body: '{"keys":[2,4,5,7]}'
+ });
+ T(xhr.status == 200);
+ T(/Total Rows/.test(xhr.responseText));
+ T(!(/Key: 1/.test(xhr.responseText)));
+ T(/Key: 2/.test(xhr.responseText));
+ T(/FirstKey: 2/.test(xhr.responseText));
+ T(/LastKey: 7/.test(xhr.responseText));
+ xhr = CouchDB.request("POST", "/test_suite_db/_list/lists/simpleForm/withReduce?group=true", {
+ body: '{"keys":[2,4,5,7]}'
+ });
+ T(xhr.status == 200);
+ T(/Total Rows/.test(xhr.responseText));
+ T(!(/Key: 1/.test(xhr.responseText)));
+ T(/Key: 2/.test(xhr.responseText));
+ T(/FirstKey: 2/.test(xhr.responseText));
+ T(/LastKey: 7/.test(xhr.responseText));
};