diff --git a/ghost/core/test/e2e-frontend/static-files.test.js b/ghost/core/test/e2e-frontend/static-files.test.js new file mode 100644 index 000000000000..53436f993cfb --- /dev/null +++ b/ghost/core/test/e2e-frontend/static-files.test.js @@ -0,0 +1,19 @@ +const assert = require('assert/strict'); +const {agentProvider} = require('../utils/e2e-framework'); + +describe('Static files', function () { + let frontendAgent; + + before(async function () { + const agents = await agentProvider.getAgentsWithFrontend(); + frontendAgent = agents.frontendAgent; + }); + + it('serves unstyled 404 for non-existing resized + original files', async function () { + const response = await frontendAgent + .get('/content/images/size/w2000/1995/12/daniel.jpg') + .expect(404); + + assert.ok(response.text.includes('NotFoundError: Image not found')); + }); +});