From be71afa07d515dba761d18b304e4468eb58d735e Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 9 Sep 2019 15:52:26 +0100 Subject: [PATCH] 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 --- core/test/regression/api/admin_spec.js | 10 +++++----- core/test/regression/site/dynamic_routing_spec.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/test/regression/api/admin_spec.js b/core/test/regression/api/admin_spec.js index 73f9efa8d1..a4edaa310c 100644 --- a/core/test/regression/api/admin_spec.js +++ b/core/test/regression/api/admin_spec.js @@ -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)); diff --git a/core/test/regression/site/dynamic_routing_spec.js b/core/test/regression/site/dynamic_routing_spec.js index ff9b38afaf..cca9de74af 100644 --- a/core/test/regression/site/dynamic_routing_spec.js +++ b/core/test/regression/site/dynamic_routing_spec.js @@ -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));