mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
c3d38a9144
refs https://github.com/TryGhost/Toolbox/issues/335 - When eventually the major will be bumped next week the returned version will become `5.0.0` which changes the `content-length` header in all of the responses using the version from package.json - The version number is dynamic, so it's expected the content-length to float as minor and patch versions fluctuate in 1-2 digit numbers. For lon-term easy maintenance it's best to set the content-length to any number (or maybe some sort of floating range in the future?)
24 lines
697 B
JavaScript
24 lines
697 B
JavaScript
const {agentProvider, matchers} = require('../../utils/e2e-framework');
|
|
const {anyEtag, stringMatching, anyContentLength} = matchers;
|
|
|
|
describe('Site API', function () {
|
|
let agent;
|
|
|
|
before(async function () {
|
|
agent = await agentProvider.getAdminAPIAgent();
|
|
});
|
|
|
|
it('can retrieve config and all expected properties', async function () {
|
|
await agent
|
|
.get('site/')
|
|
.matchBodySnapshot({
|
|
site: {
|
|
version: stringMatching(/\d+\.\d+/)
|
|
}
|
|
})
|
|
.matchHeaderSnapshot({
|
|
etag: anyEtag,
|
|
'content-length': anyContentLength
|
|
});
|
|
});
|
|
});
|