mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
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:
parent
8547ea05e0
commit
43960b7de6
@ -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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user