summaryrefslogtreecommitdiff
path: root/share/www/script/test/show_documents.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/script/test/show_documents.js')
-rw-r--r--share/www/script/test/show_documents.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/share/www/script/test/show_documents.js b/share/www/script/test/show_documents.js
index d0a2325a..ae4368a8 100644
--- a/share/www/script/test/show_documents.js
+++ b/share/www/script/test/show_documents.js
@@ -56,6 +56,9 @@ couchTests.show_documents = function(debug) {
"render-error" : stringFun(function(doc, req) {
return noSuchVariable;
}),
+ "empty" : stringFun(function(doc, req) {
+ return "";
+ }),
"xml-type" : stringFun(function(doc, req) {
return {
"headers" : {
@@ -159,6 +162,10 @@ couchTests.show_documents = function(debug) {
xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/hello");
T(xhr.responseText == "Empty World");
+ // hello template world (no docid)
+ xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/empty");
+ T(xhr.responseText == "");
+
// // hello template world (non-existing docid)
xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/hello/nonExistingDoc");
T(xhr.responseText == "New World");