From 9b791b4ba0155f41757e11480088ea375078635d Mon Sep 17 00:00:00 2001 From: SabreCat Date: Wed, 2 Nov 2022 15:15:28 -0500 Subject: [PATCH] fix(test): save user to avoid lock errors --- test/api/unit/libs/payments/apple.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/api/unit/libs/payments/apple.test.js b/test/api/unit/libs/payments/apple.test.js index 31bacfa524..8b154df0bc 100644 --- a/test/api/unit/libs/payments/apple.test.js +++ b/test/api/unit/libs/payments/apple.test.js @@ -438,6 +438,8 @@ describe('Apple Payments', () => { }); it('errors when a user is using a rebill of the same subscription', async () => { + user = new User(); + await user.save(); payments.createSubscription.restore(); iap.getPurchaseData.restore(); iapGetPurchaseDataStub = sinon.stub(iap, 'getPurchaseData') @@ -459,6 +461,8 @@ describe('Apple Payments', () => { }); it('errors when a different user is using the subscription', async () => { + user = new User(); + await user.save(); payments.createSubscription.restore(); iap.getPurchaseData.restore(); iapGetPurchaseDataStub = sinon.stub(iap, 'getPurchaseData')