mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
Added stripe_connect_integration default setting
no-issue This will be used to store the keys and other information after a sucessful Stripe Connect OAuth flow.
This commit is contained in:
parent
eb962d8e5c
commit
95acbbad93
@ -214,6 +214,9 @@
|
||||
},
|
||||
"members_subscription_settings": {
|
||||
"defaultValue": "{\"fromAddress\":\"noreply\",\"allowSelfSignup\":true,\"paymentProcessors\":[{\"adapter\":\"stripe\",\"config\":{\"secret_token\":\"\",\"public_token\":\"\",\"product\":{\"name\":\"Ghost Subscription\"},\"plans\":[{\"name\":\"Monthly\",\"currency\":\"usd\",\"interval\":\"month\",\"amount\":\"\"},{\"name\":\"Yearly\",\"currency\":\"usd\",\"interval\":\"year\",\"amount\":\"\"}]}}]}"
|
||||
},
|
||||
"stripe_connect_integration": {
|
||||
"defaultValue": "{}"
|
||||
}
|
||||
},
|
||||
"bulk_email": {
|
||||
|
@ -4,6 +4,7 @@ const mockDb = require('mock-knex');
|
||||
const models = require('../../../core/server/models');
|
||||
const {knex} = require('../../../core/server/data/db');
|
||||
const {events} = require('../../../core/server/lib/common');
|
||||
const defaultSettings = require('../../../core/server/data/schema/default-settings');
|
||||
|
||||
describe('Unit: models/settings', function () {
|
||||
before(function () {
|
||||
@ -113,8 +114,12 @@ describe('Unit: models/settings', function () {
|
||||
|
||||
return models.Settings.populateDefaults()
|
||||
.then(() => {
|
||||
const numberOfSettings = Object.keys(defaultSettings).reduce((settings, settingGroup) => {
|
||||
return settings.concat(Object.keys(defaultSettings[settingGroup]));
|
||||
}, []).length;
|
||||
// 2 events per item - settings.added and settings.[name].added
|
||||
eventSpy.callCount.should.equal(92);
|
||||
eventSpy.callCount.should.equal(numberOfSettings * 2);
|
||||
|
||||
const eventsEmitted = eventSpy.args.map(args => args[0]);
|
||||
const checkEventEmitted = event => should.ok(eventsEmitted.includes(event), `${event} event should be emitted`);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user