summaryrefslogtreecommitdiff
path: root/share/www/script/test/list_views.js
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-04-18 20:15:44 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-04-18 20:15:44 +0000
commit3e47bfd6586f42f9fe8e49cea03c4df976c781a1 (patch)
treeb3ae7a8203f2d4ec99a84762ea9aedda56864d88 /share/www/script/test/list_views.js
parentdaa9d65a53dedaac5aeeb6394d4c0b6f99fa930c (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/list_views.js')
-rw-r--r--share/www/script/test/list_views.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/share/www/script/test/list_views.js b/share/www/script/test/list_views.js
index e71ebc4e..0bf03900 100644
--- a/share/www/script/test/list_views.js
+++ b/share/www/script/test/list_views.js
@@ -130,6 +130,15 @@ couchTests.list_views = function(debug) {
}),
emptyList: stringFun(function(head, row, req, row_info) {
return { body: "" };
+ }),
+ rowError : stringFun(function(head, row, req, row_info) {
+ if (head) {
+ return "head";
+ } else if(row) {
+ return missingValue;
+ } else {
+ return "tail"
+ }
})
}
};
@@ -272,4 +281,7 @@ couchTests.list_views = function(debug) {
});
T(xhr.status == 400);
T(/query_parse_error/.test(xhr.responseText));
+
+ var xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/rowError/basicView");
+ T(/<h1>Render Error<\/h1>/.test(xhr.responseText));
};