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
12 lines
576 B
JavaScript
12 lines
576 B
JavaScript
export function enableMembers(server) {
|
|
server.db.settings.find({key: 'members_signup_access'})
|
|
? server.db.settings.update({key: 'members_signup_access'}, {value: 'all'})
|
|
: server.create('setting', {key: 'members_signup_access', value: 'all', group: 'members'});
|
|
}
|
|
|
|
export function disableMembers(server) {
|
|
server.db.settings.find({key: 'members_signup_access'})
|
|
? server.db.settings.update({key: 'members_signup_access'}, {value: 'none'})
|
|
: server.create('setting', {key: 'members_signup_access', value: 'none', group: 'members'});
|
|
}
|