mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 05:07:22 +01:00
fix(payments): correct more tests
This commit is contained in:
@@ -61,6 +61,7 @@ describe('Google Payments', () => {
|
||||
it('should throw an error if productId is invalid', async () => {
|
||||
receipt = `{"token": "${token}", "productId": "invalid"}`;
|
||||
|
||||
paymentBuyGemsStub.restore();
|
||||
await expect(googlePayments.verifyPurchase({
|
||||
user, receipt, signature, headers,
|
||||
}))
|
||||
@@ -69,6 +70,7 @@ describe('Google Payments', () => {
|
||||
name: 'BadRequest',
|
||||
message: googlePayments.constants.RESPONSE_INVALID_ITEM,
|
||||
});
|
||||
paymentBuyGemsStub = sinon.stub(payments, 'buySkuItem').resolves({});
|
||||
});
|
||||
|
||||
it('should throw an error if user cannot purchase gems', async () => {
|
||||
|
||||
Reference in New Issue
Block a user