From b749fed5b973cff57167d1886a07e7601ad99dd6 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Fri, 21 May 2021 19:46:37 +0100 Subject: [PATCH] Removed ancient skipped storage test - this has been skipped for 4 years, it must not be needed :D --- test/unit/adapters/storage/utils_spec.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/test/unit/adapters/storage/utils_spec.js b/test/unit/adapters/storage/utils_spec.js index 06c1e60d5d..c4709b4c0c 100644 --- a/test/unit/adapters/storage/utils_spec.js +++ b/test/unit/adapters/storage/utils_spec.js @@ -32,23 +32,6 @@ describe('storage utils', function () { result.should.be.equal('/2017/07/ghost-logo.png'); }); - // Very unlikely that this is necessary, because Ghost will redirect the request beforehand. - // See https://github.com/TryGhost/Ghost/blob/master/core/server/web/shared/middlewares/url-redirects.js#L76 - // TODO: Change the code to make this test work - it.skip('should return local file storage path for https request, when blog setup as http', function () { - const url = 'https://myblog.com/content/images/2017/07/ghost-logo.png'; - let result; - - urlForStub = sinon.stub(urlUtils, 'urlFor'); - urlForStub.withArgs('home').returns('http://myblog.com/'); - urlGetSubdirStub = sinon.stub(urlUtils, 'getSubdir'); - urlGetSubdirStub.returns(''); - - result = storageUtils.getLocalFileStoragePath(url); - should.exist(result); - result.should.be.equal('/2017/07/ghost-logo.png'); - }); - it('should return local file storage path for absolute URL with subdirectory', function () { const url = 'http://myblog.com/blog/content/images/2017/07/ghost-logo.png'; let result; @@ -124,7 +107,7 @@ describe('storage utils', function () { // Very unlikely that this is necessary, because Ghost will redirect the request beforehand. // See https://github.com/TryGhost/Ghost/blob/master/core/server/web/shared/middlewares/url-redirects.js#L76 // TODO: Change the code to make this test work - it.skip('should return local file storage path for https request, when blog setup as http', function () { + it('should return local file storage path for https request, when blog setup as http', function () { const url = 'https://myblog.com/content/images/2017/07/ghost-logo.png'; let result;