diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-04-18 20:15:44 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-04-18 20:15:44 +0000 |
commit | 3e47bfd6586f42f9fe8e49cea03c4df976c781a1 (patch) | |
tree | b3ae7a8203f2d4ec99a84762ea9aedda56864d88 /share/www/script/test/show_documents.js | |
parent | daa9d65a53dedaac5aeeb6394d4c0b6f99fa930c (diff) |
refactor main.js into many files and improve show/list error handling
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@766383 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test/show_documents.js')
-rw-r--r-- | share/www/script/test/show_documents.js | 7 |
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"); |