Skip to content

Commit 60c86e5

Browse files
dirPagination: Add test for pagination links when paginating over object
1 parent 01a43f4 commit 60c86e5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/directives/pagination/dirPagination.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,13 @@ describe('dirPagination directive', function() {
216216
expect(getListItems()).toEqual(['item 16', 'item 17', 'item 18', 'item 19', 'item 20']);
217217
});
218218

219+
it('should display the correct pagination links', function() {
220+
compileElement(myObjectCollection, 20, 1, "item in collection | itemsPerPage: itemsPerPage");
221+
var paginationLinks = getPageLinksArray();
222+
223+
expect(paginationLinks).toEqual(['‹','1', '2', '3', '4', '5', '›']);
224+
});
225+
219226
});
220227

221228
describe('valid expressions', function() {

0 commit comments

Comments
 (0)