From b6b32ab5705f5ea0c62b16c59deab3521da7a14a Mon Sep 17 00:00:00 2001 From: John O'Nolan Date: Mon, 21 Jul 2014 22:34:51 +0200 Subject: [PATCH] Five posts per page --- core/server/data/default-settings.json | 2 +- core/test/functional/routes/frontend_test.js | 11 ++++++++--- core/test/unit/frontend_spec.js | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/core/server/data/default-settings.json b/core/server/data/default-settings.json index 5390aae6d7..0ec4de7827 100644 --- a/core/server/data/default-settings.json +++ b/core/server/data/default-settings.json @@ -40,7 +40,7 @@ } }, "postsPerPage": { - "defaultValue": "6", + "defaultValue": "5", "validations": { "isNull": false, "isInt": true, diff --git a/core/test/functional/routes/frontend_test.js b/core/test/functional/routes/frontend_test.js index 45d5cc49b1..5a6addd8d1 100644 --- a/core/test/functional/routes/frontend_test.js +++ b/core/test/functional/routes/frontend_test.js @@ -223,12 +223,12 @@ describe('Frontend Routing', function () { describe('Archive pages', function () { - // Add enough posts to trigger pages for both the archive (6 pp) and rss (15 pp) + // Add enough posts to trigger pages for both the archive (5 pp) and rss (15 pp) // insertPosts adds 5 published posts, 1 draft post, 1 published static page and one draft page // we then insert with max 11 which ensures we have 16 published posts before(function (done) { testUtils.fixtures.insertPosts().then(function () { - return testUtils.fixtures.insertMorePosts(11); + return testUtils.fixtures.insertMorePosts(9); }).then(function () { done(); }).catch(done); @@ -277,6 +277,11 @@ describe('Frontend Routing', function () { }); describe('RSS pages', function () { + before(function (done) { + testUtils.fixtures.insertMorePosts(2).then(function () { + done(); + }).catch(done); + }); it('should redirect without slash', function (done) { request.get('/rss/2') .expect('Location', '/rss/2/') @@ -475,7 +480,7 @@ describe('Frontend Routing', function () { it('should redirect to last page if page too high', function (done) { request.get('/tag/injection/page/4/') - .expect('Location', '/tag/injection/page/2/') + .expect('Location', '/tag/injection/page/3/') .expect('Cache-Control', cacheRules['public']) .expect(302) .end(doEnd(done)); diff --git a/core/test/unit/frontend_spec.js b/core/test/unit/frontend_spec.js index 6490bf9aad..7eb49d80a1 100644 --- a/core/test/unit/frontend_spec.js +++ b/core/test/unit/frontend_spec.js @@ -51,7 +51,7 @@ describe('Frontend Controller', function () { apiSettingsStub.withArgs('postsPerPage').returns(when({ settings: [{ 'key': 'postsPerPage', - 'value': 6 + 'value': 5 }] })); }); @@ -274,7 +274,7 @@ describe('Frontend Controller', function () { apiSettingsStub.withArgs('postsPerPage').returns(when({ settings: [{ 'key': 'postsPerPage', - 'value': 6 + 'value': 5 }] })); });