From ca79ad7b3104ba4a55006a358b3b7ff2f0c060e8 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Fri, 6 Mar 2009 16:45:45 +0000 Subject: validate reduce view list queries, make query_parse_error response code 400 thanks Jan, thanks Jason Davies. closes COUCHDB-283 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@750969 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/list_views.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'share/www/script/test') diff --git a/share/www/script/test/list_views.js b/share/www/script/test/list_views.js index 6ebd159e..3e5e8db4 100644 --- a/share/www/script/test/list_views.js +++ b/share/www/script/test/list_views.js @@ -276,4 +276,11 @@ couchTests.list_views = function(debug) { T(/Key: 2/.test(xhr.responseText)); T(/FirstKey: 2/.test(xhr.responseText)); T(/LastKey: 7/.test(xhr.responseText)); + + // no multi-key fetch allowed when group=false + xhr = CouchDB.request("POST", "/test_suite_db/_list/lists/simpleForm/withReduce?group=false", { + body: '{"keys":[2,4,5,7]}' + }); + T(xhr.status == 400); + T(/query_parse_error/.test(xhr.responseText)); }; -- cgit v1.2.3