mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
stripe webhook: fix handling of automatic requests
This commit is contained in:
@@ -810,7 +810,7 @@ describe('Stripe Payments', () => {
|
||||
sinon.stub(stripe.events, 'retrieve').returnsPromise().resolves({
|
||||
id: 123,
|
||||
type: eventType,
|
||||
request: null,
|
||||
request: 123,
|
||||
});
|
||||
|
||||
await stripePayments.handleWebhooks({requestBody: {}}, stripe);
|
||||
@@ -835,6 +835,7 @@ describe('Stripe Payments', () => {
|
||||
customer: customerId,
|
||||
},
|
||||
},
|
||||
request: null,
|
||||
});
|
||||
|
||||
await expect(stripePayments.handleWebhooks({requestBody: {}}, stripe)).to.eventually.be.rejectedWith({
|
||||
@@ -868,6 +869,7 @@ describe('Stripe Payments', () => {
|
||||
customer: customerId,
|
||||
},
|
||||
},
|
||||
request: null,
|
||||
});
|
||||
|
||||
await stripePayments.handleWebhooks({requestBody: {}}, stripe);
|
||||
@@ -900,6 +902,7 @@ describe('Stripe Payments', () => {
|
||||
customer: customerId,
|
||||
},
|
||||
},
|
||||
request: null,
|
||||
});
|
||||
|
||||
await expect(stripePayments.handleWebhooks({requestBody: {}}, stripe)).to.eventually.be.rejectedWith({
|
||||
@@ -938,6 +941,7 @@ describe('Stripe Payments', () => {
|
||||
customer: customerId,
|
||||
},
|
||||
},
|
||||
request: null,
|
||||
});
|
||||
|
||||
await expect(stripePayments.handleWebhooks({requestBody: {}}, stripe)).to.eventually.be.rejectedWith({
|
||||
@@ -979,6 +983,7 @@ describe('Stripe Payments', () => {
|
||||
customer: customerId,
|
||||
},
|
||||
},
|
||||
request: null,
|
||||
});
|
||||
|
||||
await stripePayments.handleWebhooks({requestBody: {}}, stripe);
|
||||
|
||||
Reference in New Issue
Block a user