From f94630fd4af5656b4412ca5de0fc1211d19ddbf3 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Sun, 6 Dec 2009 22:47:05 +0000 Subject: fix COUCHDB-593, thanks Roger Binns for reporting git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@887791 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/show_documents.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'share/www') 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"); -- cgit v1.2.3