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 c755898e..bf12e4c6 100644
--- a/share/www/script/test/show_documents.js
+++ b/share/www/script/test/show_documents.js
@@ -54,6 +54,9 @@ couchTests.show_documents = function(debug) {
json : req
}
}),
+ "render-error" : stringFun(function(doc, req) {
+ return noSuchVariable;
+ }),
"xml-type" : stringFun(function(doc, req) {
return {
"headers" : {
@@ -142,6 +145,10 @@ couchTests.show_documents = function(debug) {
// hello template world
xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/hello/"+docid);
T(xhr.responseText == "Hello World");
+
+ // error stacktraces
+ xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/render-error/"+docid);
+ T(JSON.parse(xhr.responseText).error == "render_error");
// hello template world (no docid)
xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/hello");