From 2cf4fec22fa7214b11363eb7430c411e0afa6221 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Sat, 1 Aug 2009 11:16:36 +0000 Subject: 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 --- share/www/script/test/list_views.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'share/www') 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/)); -- cgit v1.2.3