mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05: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
1 changed files with 1 additions and 3 deletions
|
@ -22,6 +22,7 @@ describe('Members API', function () {
|
||||||
|
|
||||||
afterEach(function () {
|
afterEach(function () {
|
||||||
mockManager.restore();
|
mockManager.restore();
|
||||||
|
sinon.restore();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Can browse', async function () {
|
it('Can browse', async function () {
|
||||||
|
@ -184,7 +185,6 @@ describe('Members API', function () {
|
||||||
|
|
||||||
it('Can add complimentary subscription', async function () {
|
it('Can add complimentary subscription', async function () {
|
||||||
const stripeService = require('../../../core/server/services/stripe');
|
const stripeService = require('../../../core/server/services/stripe');
|
||||||
stripeService.api._configured = true;
|
|
||||||
const fakePrice = {
|
const fakePrice = {
|
||||||
id: 'price_1',
|
id: 'price_1',
|
||||||
product: '',
|
product: '',
|
||||||
|
@ -269,8 +269,6 @@ describe('Members API', function () {
|
||||||
.matchHeaderSnapshot({
|
.matchHeaderSnapshot({
|
||||||
etag: anyEtag
|
etag: anyEtag
|
||||||
});
|
});
|
||||||
|
|
||||||
stripeService.api._configured = false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Can edit by id', async function () {
|
it('Can edit by id', async function () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue