You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2014/01/08 15:50:47 UTC

git commit: updated refs/heads/master to 53d3942

Updated Branches:
  refs/heads/master 1a3937022 -> 53d394275


Fauxton: fix failing tests


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

Branch: refs/heads/master
Commit: 53d3942754858de2f90e328745ccb3d31f9c032a
Parents: 1a39370
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Jan 8 16:50:37 2014 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Jan 8 16:50:37 2014 +0200

----------------------------------------------------------------------
 .../app/modules/documents/tests/resourcesSpec.js      | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/53d39427/src/fauxton/app/modules/documents/tests/resourcesSpec.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/tests/resourcesSpec.js b/src/fauxton/app/modules/documents/tests/resourcesSpec.js
index e78a3c3..e848221 100644
--- a/src/fauxton/app/modules/documents/tests/resourcesSpec.js
+++ b/src/fauxton/app/modules/documents/tests/resourcesSpec.js
@@ -26,7 +26,7 @@ define([
         id:'myId2',
         doc: 'num2'
       }], {
-        database: {id: 'databaseId'},
+        database: {id: 'databaseId', safeID: function () { return this.id; }},
         design: '_design/myDoc'
       });
 
@@ -35,14 +35,14 @@ define([
     it('Should return urlNext', function () {
       var url = collection.urlNextPage(20);
 
-      assert.equal(url, 'database/databaseId/_design/myDoc/_view/?limit=20&reduce=false&startkey_docid=%22myId2%22&startkey=%22myId2%22');
+      assert.equal(url, 'database/databaseId/_design/myDoc/_view/?limit=21&reduce=false&startkey_docid=myId2&startkey=');
 
     });
 
     it('Should return urlPrevious', function () {
-      var url = collection.urlPreviousPage(20, 'myId1');
+      var url = collection.urlPreviousPage(20, {limit: 21, reduce: false,  startkey_docid: "myId1",startkey:"myId1"} );
 
-      assert.equal(url, 'database/databaseId/_design/myDoc/_view/?limit=20&reduce=false&startkey_docid=%22myId1%22&startkey=%22myId1%22');
+      assert.equal(url, 'database/databaseId/_design/myDoc/_view/?limit=20&reduce=false&startkey_docid=myId1&startkey=myId1');
 
     });
 
@@ -59,7 +59,7 @@ define([
         _id:'myId2',
         doc: 'num2'
       }], {
-        database: {id: 'databaseId'},
+        database: {id: 'databaseId', safeID: function () { return this.id; }},
         params: {limit: 20}
       });
 
@@ -73,8 +73,8 @@ define([
     });
 
      it('Should return urlPrevious', function () {
-      var url = collection.urlPreviousPage(20, 'myId1');
-      assert.equal(url, 'database/databaseId/_all_docs?limit=20&startkey_docid=%22myId1%22&startkey=%22myId1%22');
+      var url = collection.urlPreviousPage(20, {limit: 21, startkey_docid: "myId1",startkey:"myId1"} );
+      assert.equal(url, 'database/databaseId/_all_docs?limit=20&startkey_docid=myId1&startkey=myId1');
     });