0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/test/regression/api/canary/admin/site.test.js
Hannah Wolfe 0bf9d6f642
Renamed request to agent in tests
- I _think_ this makes it easier to read and understand what's happening
2022-02-04 17:19:48 +00:00

25 lines
689 B
JavaScript

const {expect} = require('chai');
const {any, stringMatching} = require('expect');
const framework = require('../../../../utils/e2e-framework');
describe('Config API', function () {
let agent;
before(async function () {
agent = await framework.getAgent('/ghost/api/canary/admin/');
});
it('can retrieve config and all expected properties', async function () {
const res = await agent
.get('site/');
expect(res.body.site).to.matchSnapshot({
version: stringMatching(/\d+\.\d+/)
});
expect(res.headers).to.matchSnapshot({
date: any(String),
etag: any(String)
});
});
});