From 5442bdb4f36f6079c5e63b5ddd8486acd032e5ad Mon Sep 17 00:00:00 2001 From: Paul Joseph Davis Date: Sat, 18 Apr 2009 16:16:35 +0000 Subject: Fixes COUCHDB-322 Specifying reduce=true now returns a 400 error when the view has no reduce function. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@766347 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/view_errors.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'share') diff --git a/share/www/script/test/view_errors.js b/share/www/script/test/view_errors.js index aa698f4d..60ccca59 100644 --- a/share/www/script/test/view_errors.js +++ b/share/www/script/test/view_errors.js @@ -80,6 +80,14 @@ couchTests.view_errors = function(debug) { T(e.error == "query_parse_error"); } + try { + db.view("test/no_reduce", {reduce: true}); + T(0 == 1); + } catch(e) { + T(db.last_req.status == 400); + T(e.error == "query_parse_error"); + } + try { db.view("test/with_reduce", {group: true, reduce: false}); T(0 == 1); -- cgit v1.2.3