From 85ca5474239268e85985e941d3c82c7fb92bbe56 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 14 Oct 2016 20:32:31 +0300 Subject: [PATCH] update pagination test so it covers separators as well --- test/pagination.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/pagination.js b/test/pagination.js index 9818ce6539..114759b79a 100644 --- a/test/pagination.js +++ b/test/pagination.js @@ -16,11 +16,12 @@ describe('Pagination', function () { done(); }); - it('should create pagination for 5 pages', function (done) { - var data = pagination.create(2, 5); - assert.equal(data.pages.length, 5); + it('should create pagination for 10 pages', function (done) { + var data = pagination.create(2, 10); + // [1, (2), 3, 4, separator, 9, 10] + assert.equal(data.pages.length, 7); assert.equal(data.rel.length, 2); - assert.equal(data.pageCount, 5); + assert.equal(data.pageCount, 10); assert.equal(data.prev.page, 1); assert.equal(data.next.page, 3); done();