Fixed disconnected Stripe test

refs https://github.com/TryGhost/Toolbox/issues/214

- Disconnected Stripe state is now a special case after the defaul test configuration was changed to have fake Stripe keys included mimicing configured Stripe
- The disconnected state is now achieved through an API call instead of mocking internal services from the test level. This seems like a cleaner approach, although still a bit cumbersome
This commit is contained in:
Naz 2022-02-18 15:35:03 +07:00 committed by naz
parent 3a974f6e4e
commit 027d6a84a8

View File

@ -42,10 +42,16 @@ let agent;
describe('Members API without Stripe', function () {
before(async function () {
agent = await agentProvider.getAdminAPIAgent();
await fixtureManager.init('members');
await fixtureManager.init();
await agent.loginAsOwner();
});
before(async function () {
await agent
.delete('/settings/stripe/connect/')
.expectStatus(200);
});
beforeEach(function () {
mockManager.mockMail();
});