Fixed error in redirect regression test

- this redirect is the only one in our tests which is permanent
- also I verified that this new test works the same before and after the recent changes :)
This commit is contained in:
Hannah Wolfe 2020-04-30 09:00:39 +01:00
parent f3bf2237e6
commit 3133c302fc

View File

@ -802,10 +802,10 @@ describe('Frontend Routing', function () {
}); });
describe('internal url redirect', function () { describe('internal url redirect', function () {
it('shold include the subdirectory', function (done) { it('should include the subdirectory', function (done) {
request.get('/blog/my-old-blog-post/') request.get('/blog/my-old-blog-post/')
.expect(302) .expect(301)
.expect('Cache-Control', testUtils.cacheRules.public) .expect('Cache-Control', testUtils.cacheRules.year)
.end(function (err, res) { .end(function (err, res) {
res.headers.location.should.eql('/blog/revamped-url/'); res.headers.location.should.eql('/blog/revamped-url/');
doEnd(done)(err, res); doEnd(done)(err, res);
@ -814,7 +814,7 @@ describe('Frontend Routing', function () {
}); });
describe('external url redirect', function () { describe('external url redirect', function () {
it('shold not include the subdirectory', function (done) { it('should not include the subdirectory', function (done) {
request.get('/blog/external-url/docs') request.get('/blog/external-url/docs')
.expect(302) .expect(302)
.expect('Cache-Control', testUtils.cacheRules.public) .expect('Cache-Control', testUtils.cacheRules.public)