summaryrefslogtreecommitdiff
path: root/share/www/script/test/reduce_false.js
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2009-12-10 13:27:42 +0000
committerChristopher Lenz <cmlenz@apache.org>2009-12-10 13:27:42 +0000
commit5ad12f26e8288a0bc4ae061b9c2f0465d1ada95d (patch)
tree7e5b7ad655b23f2e3e9db82cbcd8203d2c3c7063 /share/www/script/test/reduce_false.js
parent10e8a4b9d69e75b705f8e491a3a428fca7139d98 (diff)
Add a "Reduce" checkbox to the database view page in Futon, which controls the `reduce=true|false` query string parameter. I had to add `reduce=false` support for temp views on the server side to make the feature not-confusing.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@889256 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test/reduce_false.js')
-rw-r--r--share/www/script/test/reduce_false.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/share/www/script/test/reduce_false.js b/share/www/script/test/reduce_false.js
index 29890ce4..699b258f 100644
--- a/share/www/script/test/reduce_false.js
+++ b/share/www/script/test/reduce_false.js
@@ -25,8 +25,8 @@ couchTests.reduce_false = function(debug) {
_id:"_design/test",
language: "javascript",
views: {
- summate: {map:"function (doc) {emit(doc.integer, doc.integer)};",
- reduce:"function (keys, values) { return sum(values); };"},
+ summate: {map:"function (doc) { emit(doc.integer, doc.integer); }",
+ reduce:"function (keys, values) { return sum(values); }"},
}
};
T(db.save(designDoc).ok);
@@ -38,8 +38,7 @@ couchTests.reduce_false = function(debug) {
//Test that we get our docs back
res = db.view('test/summate', {reduce: false});
T(res.rows.length == 5);
- for(var i=0; i<5; i++)
- {
+ for(var i=0; i<5; i++) {
T(res.rows[i].value == i+1);
}
};