summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-08-01 11:16:36 +0000
committerJan Lehnardt <jan@apache.org>2009-08-01 11:16:36 +0000
commit2cf4fec22fa7214b11363eb7430c411e0afa6221 (patch)
treebca51ad663ea1392ce9b2b4dea6e05ccb6733c1f /share/www/script
parenta05287f49dc20ef83f89668f1d2603174823565e (diff)
enable include_docs=true for list functions, patch by Mark Hammond, closes COUCHDB-444
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@799835 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script')
-rw-r--r--share/www/script/test/list_views.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/share/www/script/test/list_views.js b/share/www/script/test/list_views.js
index 6ad5c6bc..4b089bac 100644
--- a/share/www/script/test/list_views.js
+++ b/share/www/script/test/list_views.js
@@ -160,6 +160,12 @@ couchTests.list_views = function(debug) {
var row = getRow();
send(fooBarBam); // intentional error
return "tail";
+ }),
+ docReference : stringFun(function(head, req) {
+ send("head");
+ var row = getRow();
+ send(row.doc.integer);
+ return "tail";
})
}
};
@@ -316,6 +322,10 @@ couchTests.list_views = function(debug) {
T(/ReferenceError/.test(xhr.responseText));
+ // with include_docs and a reference to the doc.
+ var xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/docReference/basicView?include_docs=true");
+ T(xhr.responseText.match(/head0tail/));
+
// now with extra qs params
var xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/qsParams/basicView?foo=blam");
T(xhr.responseText.match(/blam/));