0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed regression tests expecting relative URLs for admin redirects

no issue

- @tryghost/url-utils was bumped to 0.3.1 which fixed admin redirects returning relative rather than absolute URLs
- updates tests that were expecting relative URLs rather than absolute URLs
This commit is contained in:
Kevin Ansfield 2019-09-09 15:52:26 +01:00
parent 708927335b
commit be71afa07d
2 changed files with 7 additions and 7 deletions

View file

@ -68,7 +68,7 @@ describe('Admin Routing', function () {
describe('Legacy Redirects', function () {
it('should redirect /logout/ to /ghost/#/signout/', function (done) {
request.get('/logout/')
.expect('Location', '/ghost/#/signout/')
.expect('Location', 'http://127.0.0.1:2369/ghost/#/signout/')
.expect('Cache-Control', testUtils.cacheRules.year)
.expect(301)
.end(doEndNoAuth(done));
@ -76,7 +76,7 @@ describe('Admin Routing', function () {
it('should redirect /signout/ to /ghost/#/signout/', function (done) {
request.get('/signout/')
.expect('Location', '/ghost/#/signout/')
.expect('Location', 'http://127.0.0.1:2369/ghost/#/signout/')
.expect('Cache-Control', testUtils.cacheRules.year)
.expect(301)
.end(doEndNoAuth(done));
@ -84,7 +84,7 @@ describe('Admin Routing', function () {
it('should redirect /signup/ to /ghost/#/signup/', function (done) {
request.get('/signup/')
.expect('Location', '/ghost/#/signup/')
.expect('Location', 'http://127.0.0.1:2369/ghost/#/signup/')
.expect('Cache-Control', testUtils.cacheRules.year)
.expect(301)
.end(doEndNoAuth(done));
@ -93,7 +93,7 @@ describe('Admin Routing', function () {
// Admin aliases
it('should redirect /signin/ to /ghost/', function (done) {
request.get('/signin/')
.expect('Location', '/ghost/')
.expect('Location', 'http://127.0.0.1:2369/ghost/')
.expect('Cache-Control', testUtils.cacheRules.year)
.expect(301)
.end(doEndNoAuth(done));
@ -101,7 +101,7 @@ describe('Admin Routing', function () {
it('should redirect /admin/ to /ghost/', function (done) {
request.get('/admin/')
.expect('Location', '/ghost/')
.expect('Location', 'http://127.0.0.1:2369/ghost/')
.expect('Cache-Control', testUtils.cacheRules.year)
.expect(301)
.end(doEndNoAuth(done));

View file

@ -370,7 +370,7 @@ describe('Dynamic Routing', function () {
it('should redirect to tag settings', function (done) {
request.get('/tag/getting-started/edit/')
.expect('Location', '/ghost/#/settings/tags/getting-started/')
.expect('Location', 'http://127.0.0.1:2369/ghost/#/settings/tags/getting-started/')
.expect('Cache-Control', testUtils.cacheRules.public)
.expect(302)
.end(doEnd(done));
@ -597,7 +597,7 @@ describe('Dynamic Routing', function () {
it('should redirect to editor', function (done) {
request.get('/author/ghost-owner/edit/')
.expect('Location', '/ghost/#/team/ghost-owner/')
.expect('Location', 'http://127.0.0.1:2369/ghost/#/team/ghost-owner/')
.expect('Cache-Control', testUtils.cacheRules.public)
.expect(302)
.end(doEnd(done));