0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/test/regression/api/admin/site.test.js
Hannah Wolfe c80e68b93a
Updated all members tests to use mockManager
- This part of the framework can be used in isolation
- Using mockManager everywhere makes it more visible how to use it
- Aside: fixed .getAdminAPIAgent not needing a URL in site tests whilst cleaning up
2022-02-10 12:21:05 +00:00

23 lines
634 B
JavaScript

const {agentProvider, matchers} = require('../../../utils/e2e-framework');
const {anyString, stringMatching} = 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: anyString
});
});
});