0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Removed ancient paged routing tests

- these are slow, and we have unit tests in place to ensure that routing works correctly
This commit is contained in:
Hannah Wolfe 2021-05-21 20:09:42 +01:00
parent 9c6466c4ed
commit 7658572a7d
No known key found for this signature in database
GPG key ID: 9F8C7532D0A6BA55

View file

@ -321,94 +321,6 @@ describe('Dynamic Routing', function () {
.end(doEnd(done));
});
});
describe.skip('Paged', function () {
// Inserting more posts takes a bit longer
this.timeout(20000);
before(testUtils.teardownDb);
// Add enough posts to trigger pages
before(function (done) {
testUtils.initData().then(function () {
return testUtils.fixtures.insertPostsAndTags();
}).then(function () {
return testUtils.fixtures.insertExtraPosts(11);
}).then(function () {
return testUtils.fixtures.insertExtraPostsTags(11);
}).then(function () {
done();
}).catch(done);
});
after(testUtils.teardownDb);
it('should redirect without slash', function (done) {
request.get('/tag/injection/page/2')
.expect('Location', '/tag/injection/page/2/')
.expect('Cache-Control', testUtils.cacheRules.year)
.expect(301)
.end(doEnd(done));
});
it('should respond with html', function (done) {
request.get('/tag/injection/page/2/')
.expect('Content-Type', /html/)
.expect('Cache-Control', testUtils.cacheRules.public)
.expect(200)
.end(doEnd(done));
});
it('should redirect page 1', function (done) {
request.get('/tag/injection/page/1/')
.expect('Location', '/tag/injection/')
.expect('Cache-Control', testUtils.cacheRules.year)
.expect(301)
.end(doEnd(done));
});
it('should 404 if page too high', function (done) {
request.get('/tag/injection/page/3/')
.expect('Cache-Control', testUtils.cacheRules.private)
.expect(404)
.expect(/Page not found/)
.end(doEnd(done));
});
it('should 404 if page too low', function (done) {
request.get('/tag/injection/page/0/')
.expect('Cache-Control', testUtils.cacheRules.private)
.expect(404)
.expect(/Page not found/)
.end(doEnd(done));
});
describe('RSS', function () {
it('should 404 if index attempted with 0', function (done) {
request.get('/tag/getting-started/rss/0/')
.expect('Cache-Control', testUtils.cacheRules.private)
.expect(404)
.expect(/Page not found/)
.end(doEnd(done));
});
it('should 404 if index attempted with 1', function (done) {
request.get('/tag/getting-started/rss/1/')
.expect('Cache-Control', testUtils.cacheRules.private)
.expect(404)
.expect(/Page not found/)
.end(doEnd(done));
});
it('should 404 for other pages', function (done) {
request.get('/tag/getting-started/rss/2/')
.expect('Cache-Control', testUtils.cacheRules.private)
.expect(404)
.expect(/Page not found/)
.end(doEnd(done));
});
});
});
});
describe('Author', function () {