mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
18f4748e8b
no issue Also moves some reused test methods to the test helpers folder (wasn't able to move it to the fixtures because too many tests were failing): - enableNewsletters helper - enableStripe helper - enableMailgun helper
6 lines
388 B
JavaScript
6 lines
388 B
JavaScript
export function enableNewsletters(server, enabled) {
|
|
server.db.settings.find({key: 'editor_default_email_recipients'})
|
|
? server.db.settings.update({key: 'editor_default_email_recipients'}, {value: enabled ? 'visibility' : 'disabled'})
|
|
: server.create('setting', {key: 'editor_default_email_recipients', value: enabled ? 'visibility' : 'disabled', group: 'editor'});
|
|
}
|