0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Merge pull request #3354 from JohnONolan/ppp

This commit is contained in:
Hannah Wolfe 2014-07-24 17:44:37 +01:00
commit 6d7563986b
3 changed files with 11 additions and 6 deletions

View file

@ -40,7 +40,7 @@
} }
}, },
"postsPerPage": { "postsPerPage": {
"defaultValue": "6", "defaultValue": "5",
"validations": { "validations": {
"isNull": false, "isNull": false,
"isInt": true, "isInt": true,

View file

@ -223,12 +223,12 @@ describe('Frontend Routing', function () {
describe('Archive pages', 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 // 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 // we then insert with max 11 which ensures we have 16 published posts
before(function (done) { before(function (done) {
testUtils.fixtures.insertPosts().then(function () { testUtils.fixtures.insertPosts().then(function () {
return testUtils.fixtures.insertMorePosts(11); return testUtils.fixtures.insertMorePosts(9);
}).then(function () { }).then(function () {
done(); done();
}).catch(done); }).catch(done);
@ -277,6 +277,11 @@ describe('Frontend Routing', function () {
}); });
describe('RSS pages', function () { describe('RSS pages', function () {
before(function (done) {
testUtils.fixtures.insertMorePosts(2).then(function () {
done();
}).catch(done);
});
it('should redirect without slash', function (done) { it('should redirect without slash', function (done) {
request.get('/rss/2') request.get('/rss/2')
.expect('Location', '/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) { it('should redirect to last page if page too high', function (done) {
request.get('/tag/injection/page/4/') request.get('/tag/injection/page/4/')
.expect('Location', '/tag/injection/page/2/') .expect('Location', '/tag/injection/page/3/')
.expect('Cache-Control', cacheRules['public']) .expect('Cache-Control', cacheRules['public'])
.expect(302) .expect(302)
.end(doEnd(done)); .end(doEnd(done));

View file

@ -51,7 +51,7 @@ describe('Frontend Controller', function () {
apiSettingsStub.withArgs('postsPerPage').returns(when({ apiSettingsStub.withArgs('postsPerPage').returns(when({
settings: [{ settings: [{
'key': 'postsPerPage', 'key': 'postsPerPage',
'value': 6 'value': 5
}] }]
})); }));
}); });
@ -274,7 +274,7 @@ describe('Frontend Controller', function () {
apiSettingsStub.withArgs('postsPerPage').returns(when({ apiSettingsStub.withArgs('postsPerPage').returns(when({
settings: [{ settings: [{
'key': 'postsPerPage', 'key': 'postsPerPage',
'value': 6 'value': 5
}] }]
})); }));
}); });