summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2010-01-23 15:29:33 +0000
committerJan Lehnardt <jan@apache.org>2010-01-23 15:29:33 +0000
commit5a87b852a72cc36d4d7b64271ed542ce2a1befe0 (patch)
tree0b2a694cedc6edb3b0fe7f783f4f894d18b15467 /share/www
parentf4033185bbd88d827dfc47bd58cdbfd5ec0e8866 (diff)
show conflicts in changes filters. Patch by Lena Herrmann. Closes COUCHDB-630
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@902422 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/test/changes.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/share/www/script/test/changes.js b/share/www/script/test/changes.js
index cb6640eb..a7703d77 100644
--- a/share/www/script/test/changes.js
+++ b/share/www/script/test/changes.js
@@ -175,7 +175,8 @@ couchTests.changes = function(debug) {
}),
"userCtx" : stringFun(function(doc, req) {
return doc.user && (doc.user == req.userCtx.name);
- })
+ }),
+ "conflicted" : "function(doc, req) { return (doc._conflicts);}",
}
}
@@ -286,11 +287,19 @@ couchTests.changes = function(debug) {
resp = JSON.parse(req.responseText);
T(resp.results.length == 1, "userCtx");
T(resp.results[0].id == docResp.id);
- });
+ }
+ );
req = CouchDB.request("GET", "/test_suite_db/_changes?limit=1");
resp = JSON.parse(req.responseText);
- TEquals(1, resp.results.length);
+ TEquals(1, resp.results.length)
+ //filter includes _conflicts
+ var id = db.save({'food' : 'pizza'}).id;
+ db.bulkSave([{_id: id, 'food' : 'pasta'}], {all_or_nothing:true});
+ req = CouchDB.request("GET", "/test_suite_db/_changes?filter=changes_filter/conflicted");
+ resp = JSON.parse(req.responseText);
+ T(resp.results.length == 1);
};
+