diff --git a/app/src/components/common/__tests__/GuestInviteButton.test.tsx b/app/src/components/common/__tests__/GuestInviteButton.test.tsx index f5c72718..598ab77a 100644 --- a/app/src/components/common/__tests__/GuestInviteButton.test.tsx +++ b/app/src/components/common/__tests__/GuestInviteButton.test.tsx @@ -113,7 +113,7 @@ describe('', () => { const message = 'There was an error sending the invite.'; server.use( - http.post(`${import.meta.env.VITE_HUU_API_BASE_URL}/auth/invite`, () => { + http.post('/api/auth/invite', () => { return HttpResponse.json( { message, diff --git a/app/src/utils/test/handlers/auth.ts b/app/src/utils/test/handlers/auth.ts index 1445fa62..b346adc7 100644 --- a/app/src/utils/test/handlers/auth.ts +++ b/app/src/utils/test/handlers/auth.ts @@ -1,10 +1,10 @@ import {http, HttpResponse} from 'msw'; export const handlers = [ - http.post('/auth/forgot_password', () => { + http.post('/api/auth/forgot_password', () => { return new HttpResponse(); }), - http.post('/auth/invite', () => { + http.post('/api/auth/invite', () => { return new HttpResponse(); }), ]; diff --git a/app/src/views/__tests__/ForgotPasswordCode.test.tsx b/app/src/views/__tests__/ForgotPasswordCode.test.tsx index ad4c231a..182980b7 100644 --- a/app/src/views/__tests__/ForgotPasswordCode.test.tsx +++ b/app/src/views/__tests__/ForgotPasswordCode.test.tsx @@ -96,17 +96,14 @@ describe('ForgotPasswordCode page', () => { }); test('display an error message', async () => { server.use( - http.post( - `${import.meta.env.VITE_HUU_API_BASE_URL}/auth/forgot_password`, - () => { - return HttpResponse.json( - { - message: 'Invalid email address', - }, - {status: 400}, - ); - }, - ), + http.post('/api/auth/forgot_password', () => { + return HttpResponse.json( + { + message: 'Invalid email address', + }, + {status: 400}, + ); + }), ); setup();