mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
d7c2759b3f
refs: https://github.com/TryGhost/Toolbox/issues/158 - Working up to having these be the defacto "reference" tests - Changing this allows for the fact that there will be a getContentAPIAgent, and probably more in future - Abstracting away the path to a single location will make updating API paths easier later too
23 lines
672 B
JavaScript
23 lines
672 B
JavaScript
const {any, stringMatching} = require('@tryghost/jest-snapshot');
|
|
const {agentProvider} = require('../../../utils/e2e-framework');
|
|
|
|
describe('Site API', function () {
|
|
let agent;
|
|
|
|
before(async function () {
|
|
agent = await agentProvider.getAdminAPIAgent('/ghost/api/canary/admin/');
|
|
});
|
|
|
|
it('can retrieve config and all expected properties', async function () {
|
|
await agent
|
|
.get('site/')
|
|
.matchBodySnapshot({
|
|
site: {
|
|
version: stringMatching(/\d+\.\d+/)
|
|
}
|
|
})
|
|
.matchHeaderSnapshot({
|
|
etag: any(String)
|
|
});
|
|
});
|
|
});
|