mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 07:51:55 +03:00
3f0e46c7b0
refs https://github.com/TryGhost/Team/issues/1586 - added test helper for enabling/disabling members and helpers for disabling mailgun and newsletters - added `loginAsRole` helper that alleviates duplication of user+role creation and also handles log-out before log-in so it's easier to mix different role tests within a block that has a default role setup in `beforeEach()` - cleaned up editor tests that were skipped due to using the old publish flow - added `Publish flow` acceptance test suite with an initial batch of tests
10 lines
485 B
JavaScript
10 lines
485 B
JavaScript
export function enableNewsletters(server, enabled = true) {
|
|
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'});
|
|
}
|
|
|
|
export function disableNewsletters(server) {
|
|
enableNewsletters(server, false);
|
|
}
|