test(api): use a future baseline in invoice-skip premium tests (#2061)

This commit is contained in:
Hampus authored and GitHub committed 2026-08-29 01:22:29 +02:00
1 parent ba1be73389
commit 243954c9c5
1 file changed
+2 -2
@@ -439,7 +439,7 @@ describe('Stripe Webhook - Invoice Events', () => {
test('skips zero-amount subscription_update invoice without granting an extra monthly cycle', async () => { test('skips zero-amount subscription_update invoice without granting an extra monthly cycle', async () => {
const account = await createTestAccount(harness); const account = await createTestAccount(harness);
const subscriptionId = `sub_test_${Date.now()}`; 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) await createBuilder(harness, account.token)
.post(`/test/users/${account.userId}/premium`) .post(`/test/users/${account.userId}/premium`)
.body({ .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 () => { test('skips paid subscription_update invoices so interval switches do not grant extra time', async () => {
const account = await createTestAccount(harness); const account = await createTestAccount(harness);
const subscriptionId = `sub_test_${Date.now()}`; 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) await createBuilder(harness, account.token)
.post(`/test/users/${account.userId}/premium`) .post(`/test/users/${account.userId}/premium`)
.body({ .body({