Add logic for different types of sub upgrades

This commit is contained in:
Phillip Thelen
2022-11-09 19:49:53 +01:00
committed by Phillip Thelen
parent 8dfa21a4b8
commit 64a3515c10
4 changed files with 474 additions and 50 deletions

View File

@@ -322,6 +322,7 @@ describe('Apple Payments', () => {
const newOption = subOptions[3];
it(`upgrades a subscription from ${option.sku} to ${newOption.sku}`, async () => {
const oldSub = common.content.subscriptionBlocks[option.subKey];
oldSub.logic = 'refundAndRepay';
user.profile.name = 'sender';
user.purchased.plan.paymentMethod = applePayments.constants.PAYMENT_METHOD_APPLE;
user.purchased.plan.customerId = token;