Skip to content

Commit 59f1d11

Browse files
committed
fix(test): queue resolveBillingActorId's owner lookup in payment-failure email test
handleInvoicePaymentFailed's new payment_failed audit instrumentation resolves the billing actor via an extra db.select before sendPaymentFailureEmails runs. The test's fixed select-response queue didn't account for it, so the org-admin lookup consumed the wrong queued row and the assertion saw zero email sends. Production behavior is unaffected — each query is independent; this was a mock-queue ordering issue only.
1 parent 409676e commit 59f1d11

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

apps/sim/lib/billing/webhooks/invoices.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ describe('invoice billing recovery', () => {
207207
},
208208
],
209209
})
210+
queueSelectResponse({ limitResult: [{ userId: 'owner-1' }] }) // resolveBillingActorId owner lookup (payment_failed instrumentation)
210211
queueSelectResponse({
211212
whereResult: [{ userId: 'owner-1', role: 'owner' }],
212213
})

0 commit comments

Comments
 (0)