You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2015/11/12 22:23:42 UTC

[04/12] couchdb commit: updated refs/heads/2876-js-tests to def9465

since is opaque, not a string


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0e6536e2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0e6536e2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0e6536e2

Branch: refs/heads/2876-js-tests
Commit: 0e6536e2b07c22e7d5f8a0ec9b50e5254b915113
Parents: bd19653
Author: sebastianro <se...@apache.org>
Authored: Mon Nov 2 18:40:08 2015 +0100
Committer: sebastianro <se...@apache.org>
Committed: Thu Nov 12 21:56:05 2015 +0100

----------------------------------------------------------------------
 test/javascript/tests/changes.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/0e6536e2/test/javascript/tests/changes.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/changes.js b/test/javascript/tests/changes.js
index c65ff5c..ec490b8 100644
--- a/test/javascript/tests/changes.js
+++ b/test/javascript/tests/changes.js
@@ -669,7 +669,7 @@ couchTests.changes = function(debug) {
   TEquals(2, resp.results.length);
 
   // we can no longer pass a number into 'since' - but we have the 2nd last above - so we can use it (puh!)
-  req = CouchDB.request("GET", "/" + db.name + "/_changes?style=all_docs&since=" + encodeURIComponent(JSON.stringify(resp.results[0].seq)));
+  req = CouchDB.request("GET", "/" + db.name + "/_changes?style=all_docs&since=" + encodeURIComponent(resp.results[0].seq));
   resp = JSON.parse(req.responseText);
 
   // (seq as before)
@@ -693,7 +693,7 @@ couchTests.changes = function(debug) {
 
   // simulate an EventSource request with a Last-Event-ID header
   req = CouchDB.request("GET", "/" + db_name + "/_changes?feed=eventsource&timeout=0&since=0",
-        {"headers": {"Accept": "text/event-stream", "Last-Event-ID": JSON.stringify(JSON.parse(req.responseText).results[1].seq)}});
+        {"headers": {"Accept": "text/event-stream", "Last-Event-ID": JSON.parse(req.responseText).results[1].seq}});
 
   // "parse" the eventsource response and collect only the "id: ..." lines
   var changes = req.responseText.split('\n')
@@ -703,10 +703,10 @@ couchTests.changes = function(debug) {
      .filter(function (el) { return (el[0] === "id"); })
 
   // make sure we only got 2 changes, and they are update_seq=3 and update_seq=4
-// TODO: can't pass in new-style Sequence with Last-Event-ID header
-//  T(changes.length === 2);
-//  T(changes[0][1] === "3");
-//  T(changes[1][1] === "4");
+  T(changes.length === 2);
+  // seq is different now
+  //T(changes[0][1] === "3");
+  //T(changes[1][1] === "4");
 
   // COUCHDB-1923
   // test w/ new temp DB