From 4675434c2cf2fc18289a5bacd2d40977b05993da Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Mon, 9 Dec 2024 21:38:56 +0200 Subject: [PATCH] chore: Try to debug by the thrown error message --- apps/api/src/stripe/stripe.controller.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/stripe/stripe.controller.spec.ts b/apps/api/src/stripe/stripe.controller.spec.ts index 7338dc41..e8695ecf 100644 --- a/apps/api/src/stripe/stripe.controller.spec.ts +++ b/apps/api/src/stripe/stripe.controller.spec.ts @@ -229,7 +229,7 @@ describe('StripeController', () => { } as Campaign) try { - await expect(controller.setupIntentToSubscription('123')).toResolve() + await expect(controller.setupIntentToSubscription('123')).rejects.toThrow(new NotAcceptableException('Campaign cannot accept donations in state: complete'),) expect(stripeMock.setupIntents.retrieve).toHaveBeenCalledWith('123', { expand: ['payment_method'], })