mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
Fixed skipped test for fetching setting by group
no issue - The test was skipped, which should not have been commited into the trunk in the first place. The checks were reworked to reflect the reality - the endpoint ignores the "group" qurey parameter
This commit is contained in:
parent
e03f99a8f3
commit
7ea91df628
@ -154,7 +154,7 @@ describe('Settings API (v2)', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
xit('Can not request settings by group, returns all settings instead', function () {
|
it('Can not request settings by group, returns all settings instead', function () {
|
||||||
return request.get(localUtils.API.getApiQuery(`settings/?group=theme`))
|
return request.get(localUtils.API.getApiQuery(`settings/?group=theme`))
|
||||||
.set('Origin', config.get('url'))
|
.set('Origin', config.get('url'))
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
@ -170,8 +170,8 @@ describe('Settings API (v2)', function () {
|
|||||||
jsonResponse.settings.should.be.an.Object();
|
jsonResponse.settings.should.be.an.Object();
|
||||||
const settings = jsonResponse.settings;
|
const settings = jsonResponse.settings;
|
||||||
|
|
||||||
Object.keys(settings).length.should.equal(39);
|
Object.keys(settings).length.should.equal(defaultSettingsKeyTypes.length);
|
||||||
settings.map(s => s.key).should.deepEqual(defaultSettingsKeyTypes);
|
settings.map(s => s.key).sort().should.eql(defaultSettingsKeyTypes.map(s => s.key).sort());
|
||||||
|
|
||||||
localUtils.API.checkResponse(jsonResponse, 'settings');
|
localUtils.API.checkResponse(jsonResponse, 'settings');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user