summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-11-30 18:52:33 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-11-30 18:52:33 +0000
commitb232effb7b51c831c0eccfb553514bd2b0c41c0b (patch)
tree2b64b50eef49190b0204e9252c4cbd43c5e69050
parentb409b8836b82612880df1628cf831d0420e5eb2a (diff)
passing test for filtered continuous changes
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@885533 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--share/www/script/test/changes.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/share/www/script/test/changes.js b/share/www/script/test/changes.js
index fe18f2d1..fb9d724e 100644
--- a/share/www/script/test/changes.js
+++ b/share/www/script/test/changes.js
@@ -219,6 +219,17 @@ couchTests.changes = function(debug) {
var resp = JSON.parse(xhr.responseText);
T(resp.last_seq == 9);
T(resp.results && resp.results.length > 0 && resp.results[0]["id"] == id, "filter the correct update");
+
+ // filter with continuous
+ xhr = CouchDB.newXhr();
+ xhr.open("GET", "/test_suite_db/_changes?feed=continuous&filter=changes_filter/bop&timeout=100", true);
+ xhr.send("");
+ db.save({"_id":"rusty", "bop" : "plankton"});
+ sleep(200);
+ var lines = xhr.responseText.split("\n");
+ T(JSON.parse(lines[1]).id == id);
+ T(JSON.parse(lines[2]).id == "rusty");
+ T(JSON.parse(lines[3]).last_seq == 10);
}
// error conditions
@@ -246,7 +257,7 @@ couchTests.changes = function(debug) {
var req = CouchDB.request("GET",
"/test_suite_db/_changes?filter=changes_filter/bop&style=all_docs");
var resp = JSON.parse(req.responseText);
- TEquals(2, resp.results.length, "should return two rows");
+ TEquals(3, resp.results.length, "should return matching rows");
// test for userCtx
run_on_modified_server(