0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/test/regression/api/canary/admin/site.test.js
Naz f4ad3b23ba Removed need for 'Origin' header in test suites
refs https://github.com/TryGhost/Toolbox/issues/129

- The "Origin" header is require in Admin API requests so it makes sense to bake it into a default request made by most tests. Reduces unnecesary fluf around test request setup and removes a "config" dependency in each tests suite using the "e2e framework"
2021-12-10 11:05:37 +04:00

25 lines
695 B
JavaScript

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