diff --git a/frontend/src/__tests__/app/signin/route.test.ts b/frontend/src/__tests__/app/signin/route.test.ts index 7e640189..b1b9bc65 100644 --- a/frontend/src/__tests__/app/signin/route.test.ts +++ b/frontend/src/__tests__/app/signin/route.test.ts @@ -31,7 +31,9 @@ test('returns redirect', async () => { secure: true, }); expect(response.status).toEqual(307); - expect(response.headers.get('Location')).toEqual('/redirect-url'); + expect(response.headers.get('Location')).toEqual( + 'http://localhost:3000/redirect-url' + ); }); test('returns redirect - sanitizes redirect path', async () => { @@ -43,7 +45,9 @@ test('returns redirect - sanitizes redirect path', async () => { const response = await GET(request); expect(response.status).toEqual(307); - expect(response.headers.get('Location')).toEqual('/redirect-url'); + expect(response.headers.get('Location')).toEqual( + 'http://localhost:3000/redirect-url' + ); }); test('returns redirect to /templates/message-templates if no redirect given', async () => { @@ -56,7 +60,7 @@ test('returns redirect to /templates/message-templates if no redirect given', as expect(response.status).toEqual(307); expect(response.headers.get('Location')).toEqual( - '/templates/message-templates' + 'http://localhost:3000/templates/message-templates' ); }); @@ -71,7 +75,7 @@ test('returns redirect to /auth if no session detected', async () => { expect(cookiesMock.delete).toHaveBeenCalledWith('csrf_token'); expect(response.status).toEqual(307); - expect(response.headers.get('Location')).toEqual('/auth'); + expect(response.headers.get('Location')).toEqual('https://test/auth'); }); test('retains redirect search param on /auth redirect', async () => { @@ -86,6 +90,6 @@ test('retains redirect search param on /auth redirect', async () => { expect(response.status).toEqual(307); expect(response.headers.get('Location')).toEqual( - '/auth?redirect=%2Fredirect-path' + 'https://test/auth?redirect=%2Fredirect-path' ); }); diff --git a/frontend/src/__tests__/components/__snapshots__/Header.test.tsx.snap b/frontend/src/__tests__/components/__snapshots__/Header.test.tsx.snap index 314b995c..6690fdd8 100644 --- a/frontend/src/__tests__/components/__snapshots__/Header.test.tsx.snap +++ b/frontend/src/__tests__/components/__snapshots__/Header.test.tsx.snap @@ -18,7 +18,7 @@ exports[`Header component renders component correctly 1`] = ` aria-label="NHS Notify templates" class="nhsuk-header__service-logo" data-testid="header-logo-service-link" - href="/templates/create-and-submit-templates" + href="http://localhost:3000/templates/create-and-submit-templates" >