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

28 lines
898 B
JavaScript
Raw Normal View History

const should = require('should');
const framework = require('../../../../utils/e2e-framework');
const testUtils = require('../../../../utils');
const localUtils = require('./utils');
const config = require('../../../../../core/shared/config');
describe('Config API', function () {
let request;
before(async function () {
request = await framework.getAgent();
});
it('can retrieve config and all expected properties', async function () {
const res = await request
.get(localUtils.API.getApiQuery('site/'))
.set('Origin', config.get('url'))
.expect('Content-Type', /json/)
.expect('Cache-Control', testUtils.cacheRules.private)
.expect(200);
localUtils.API.checkResponse(res.body.site, 'site');
// minor (safe) version
res.body.site.version.should.match(/\d+\.\d+/);
});
});