mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-25 02:31:59 -05:00
🎨 Enabled Unsplash by default
refs https://github.com/TryGhost/Ghost/issues/8859 There are four cases: - unsplash setting is empty (default), admin can enable the app by default (hardcoded isActive:true) - unsplash settings are set, unsplash is disabled, admin detects that app was disabled on purpose - unsplash setting is set, unsplash is enabled and has a key, app is enabled, old key get's ignored and overridden on the next save - unsplash setting is set, unsplash is enabled and has no key, app is enabled
This commit is contained in:
parent
79fead5516
commit
f478e4f9c8
2 changed files with 6 additions and 1 deletions
|
@ -82,7 +82,7 @@
|
|||
"defaultValue": "[{\"url\":\"\"}]"
|
||||
},
|
||||
"unsplash": {
|
||||
"defaultValue": ""
|
||||
"defaultValue": "{\"isActive\": true}"
|
||||
}
|
||||
},
|
||||
"theme": {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
var should = require('should'),
|
||||
_ = require('lodash'),
|
||||
supertest = require('supertest'),
|
||||
testUtils = require('../../../utils'),
|
||||
config = require('../../../../../core/server/config'),
|
||||
|
@ -48,6 +49,10 @@ describe('Settings API', function () {
|
|||
should.exist(jsonResponse);
|
||||
|
||||
testUtils.API.checkResponse(jsonResponse, 'settings');
|
||||
|
||||
JSON.parse(_.find(jsonResponse.settings, {key: 'unsplash'}).value).isActive.should.eql(true);
|
||||
JSON.parse(_.find(jsonResponse.settings, {key: 'amp'}).value).should.eql(true);
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue