From e88ac2ea05da14a25052b59b523523d2c7d3425a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20M=C3=A9vollon?= Date: Thu, 3 Nov 2022 10:49:19 +0100 Subject: [PATCH] test: fix /api/onboarding/request --- __tests__/api/onboarding/request.test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/__tests__/api/onboarding/request.test.js b/__tests__/api/onboarding/request.test.js index 03f0d38b..fd0a04d0 100644 --- a/__tests__/api/onboarding/request.test.js +++ b/__tests__/api/onboarding/request.test.js @@ -7,7 +7,10 @@ import { server } from "@/mocks/server" jest.mock("@/utils/log-action", () => jest.fn()) jest.mock("@/utils/jwt", () => ({ getJwt: jest.fn() })) jest.mock("@/utils/send-email", () => ({ - sendRequestMail: jest.fn(), + sendRequestMail: jest.fn(() => ({ + status: 200, + text: () => Promise.resolve("response"), + })), })) jest.mock("@/utils/env", () => ({ NEXTAUTH_URL: "http://fake.fr",