A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
test(api): use a future baseline in invoice-skip premium tests (#2061)
Hampus243954c9c531
diff --git a/fluxer_api/src/api/stripe/tests/StripeWebhookInvoice.test.ts b/fluxer_api/src/api/stripe/tests/StripeWebhookInvoice.test.tsindex 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({