From 243954c9c531b4e7dffa27ae3e67605095b85b32 Mon Sep 17 00:00:00 2001 From: Hampus Date: Sat, 29 Aug 2026 01:22:29 +0200 Subject: [PATCH] test(api): use a future baseline in invoice-skip premium tests (#2061) --- fluxer_api/src/api/stripe/tests/StripeWebhookInvoice.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluxer_api/src/api/stripe/tests/StripeWebhookInvoice.test.ts b/fluxer_api/src/api/stripe/tests/StripeWebhookInvoice.test.ts index 4f712ab54..72a9ec82f 100644 --- a/fluxer_api/src/api/stripe/tests/StripeWebhookInvoice.test.ts +++ b/fluxer_api/src/api/stripe/tests/StripeWebhookInvoice.test.ts @@ -439,7 +439,7 @@ describe('Stripe Webhook - Invoice Events', () => { test('skips zero-amount subscription_update invoice without granting an extra monthly cycle', async () => { const account = await createTestAccount(harness); const subscriptionId = `sub_test_${Date.now()}`; - const baselinePremiumUntil = new Date('2026-08-25T21:57:05.000Z'); + const baselinePremiumUntil = new Date(Date.now() + 30 * 24 * 60 * 60 * 1000); await createBuilder(harness, account.token) .post(`/test/users/${account.userId}/premium`) .body({ @@ -481,7 +481,7 @@ describe('Stripe Webhook - Invoice Events', () => { test('skips paid subscription_update invoices so interval switches do not grant extra time', async () => { const account = await createTestAccount(harness); const subscriptionId = `sub_test_${Date.now()}`; - const baselinePremiumUntil = new Date('2026-08-25T21:57:05.000Z'); + const baselinePremiumUntil = new Date(Date.now() + 30 * 24 * 60 * 60 * 1000); await createBuilder(harness, account.token) .post(`/test/users/${account.userId}/premium`) .body({