Skip to content
This repository was archived by the owner on May 17, 2018. It is now read-only.

Commit 072518c

Browse files
committed
Fix #51 correctly initialize 0-based infinite mode pageable collection
1 parent 4645069 commit 072518c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/infinite-pageable.js

+11
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ $(document).ready(function () {
3434
});
3535
deepEqual(col.toJSON(), [{id: 2}, {id: 4}]);
3636
deepEqual(col.fullCollection.toJSON(), [{id: 1}, {id: 3}, {id: 2}, {id: 4}]);
37+
38+
col = new (Backbone.PageableCollection.extend({
39+
url: "url"
40+
}))(null, {
41+
state: {
42+
firstPage: 0
43+
},
44+
mode: "infinite"
45+
});
46+
47+
ok(col.links[0] === "url");
3748
});
3849

3950
test("parseLinks", function () {

0 commit comments

Comments
 (0)