Skip to content

Commit

Permalink
Update Test/Index.js, redirect should be 301
Browse files Browse the repository at this point in the history
  • Loading branch information
nofluffdigital authored Sep 21, 2019
1 parent 307d9f9 commit 35db5ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe('server', () => {

it('append trailing slash', () => Promise.using(prepareServer(), app => request(app).get('/foo')
.expect('Location', '/foo/')
.expect(302, 'Redirecting')));
.expect(301, 'Redirecting')));

it('don\'t append trailing slash if URL has a extension name', () => Promise.using(prepareServer(), app => request(app).get('/bar.txt')
.expect(404)));
Expand All @@ -149,7 +149,7 @@ describe('server', () => {

return Promise.using(prepareServer(), app => request(app).get('/')
.expect('Location', '/test/')
.expect(302, 'Redirecting')).finally(() => {
.expect(301, 'Redirecting')).finally(() => {
hexo.config.root = '/';
});
});
Expand Down

0 comments on commit 35db5ef

Please sign in to comment.