Ghost/test/e2e-api/admin/site.test.js
Hannah Wolfe 857464c104
Swapped etag matcher to always be anyEtag
- some tests were using anyString, but we have a more specific matcher available
- it's best to use the most specific matcher possible
2022-05-02 11:05:07 +01:00

24 lines
627 B
JavaScript

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