Skip to content

Commit 2355536

Browse files
dirPagination: add a test case
1 parent 5fd576f commit 2355536

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/directives/pagination/dirPagination.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,15 @@ describe('dirPagination directive', function() {
337337
expect(getListItems().length).toEqual(10);
338338
});
339339

340+
it('should allow track by with dot in itemsPerPage', function() {
341+
function compile() {
342+
$scope.foo = { perPage : 10 };
343+
compileElement(myCollection, 5, 1, "item in collection | itemsPerPage: foo.perPage track by item");
344+
}
345+
expect(compile).not.toThrow();
346+
expect(getListItems().length).toEqual(10);
347+
});
348+
340349
});
341350

342351
describe('if currentPage attribute is not set', function() {

0 commit comments

Comments
 (0)