Skip to content

Commit

Permalink
added e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellockyer committed Mar 15, 2024
1 parent 68ab120 commit 622860f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ghost/core/test/e2e-frontend/static-files.test.js
@@ -0,0 +1,25 @@
const assert = require('assert/strict');
const {agentProvider} = require('../utils/e2e-framework');

describe('Static files', function () {
let frontendAgent;
let ghostServer;

before(async function () {
const agents = await agentProvider.getAgentsWithFrontend();
frontendAgent = agents.frontendAgent;
ghostServer = agents.ghostServer;
});

after(async function () {
await ghostServer.stop();
});

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'));
});
});

0 comments on commit 622860f

Please sign in to comment.