summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/www/script/test/erlang_views.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/share/www/script/test/erlang_views.js b/share/www/script/test/erlang_views.js
index 7eddab402..c6bc5d710 100644
--- a/share/www/script/test/erlang_views.js
+++ b/share/www/script/test/erlang_views.js
@@ -44,7 +44,10 @@ couchTests.erlang_views = function(debug) {
// check simple reduction - another doc with same key.
var doc = {_id: "2", integer: 1, string: "str2"};
T(db.save(doc).ok);
- rfun = "fun(Keys, Values, ReReduce) -> length(Values) end.";
+ rfun = 'fun' +
+ ' (_, Values, false) -> length(Values); ' +
+ ' (_, Values, true) -> lists:sum(Values) ' +
+ ' end.';
results = db.query(mfun, rfun, null, null, "erlang");
T(results.rows[0].value == 2);