summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarren Smith <garren.smith@gmail.com>2014-01-08 16:50:37 +0200
committerGarren Smith <garren.smith@gmail.com>2014-01-08 16:50:37 +0200
commit53d3942754858de2f90e328745ccb3d31f9c032a (patch)
tree84794e00f1e7097cc73941f91e7d3ea66d1fa638
parent1a3937022cc11fb0b5256165f4e4f2259fd9f468 (diff)
downloadcouchdb-53d3942754858de2f90e328745ccb3d31f9c032a.tar.gz
Fauxton: fix failing tests
-rw-r--r--src/fauxton/app/modules/documents/tests/resourcesSpec.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fauxton/app/modules/documents/tests/resourcesSpec.js b/src/fauxton/app/modules/documents/tests/resourcesSpec.js
index e78a3c391..e848221ff 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');
});