Ghost/ghost/admin/tests/helpers/members.js
Kevin Ansfield 3f0e46c7b0 Added initial tests for new publish flow
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
2022-05-30 19:12:16 +01:00

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'});
}