Removed a side effect in member tests

- Removed stubs after each tests
- Removed assignments to `_configured` as they lead to side effects is the stripe service is configured beforehands
This commit is contained in:
Thibaut Patel 2022-02-16 14:02:13 +01:00
parent 8547ea05e0
commit 43960b7de6

View File

@ -22,6 +22,7 @@ describe('Members API', function () {
afterEach(function () {
mockManager.restore();
sinon.restore();
});
it('Can browse', async function () {
@ -184,7 +185,6 @@ describe('Members API', function () {
it('Can add complimentary subscription', async function () {
const stripeService = require('../../../core/server/services/stripe');
stripeService.api._configured = true;
const fakePrice = {
id: 'price_1',
product: '',
@ -269,8 +269,6 @@ describe('Members API', function () {
.matchHeaderSnapshot({
etag: anyEtag
});
stripeService.api._configured = false;
});
it('Can edit by id', async function () {