refactor: extract a create cookie middleware

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2024-03-18 10:27:26 +01:00
committed by Patrik Oldsberg
parent 7b77befdfb
commit f17da85b08
9 changed files with 56 additions and 12 deletions
@@ -119,7 +119,7 @@ describe('CookieAuthRefreshProvider', () => {
await waitFor(() =>
expect(fetchApiMock.fetch).toHaveBeenCalledWith(
'http://localhost:7000/techdocs/api/cookie',
'http://localhost:7000/techdocs/api/.backstage/v1-cookie',
{ credentials: 'include' },
),
);
@@ -236,7 +236,7 @@ describe('useCookieAuthRefresh', () => {
await waitFor(() =>
expect(fetchApiMock.fetch).toHaveBeenCalledWith(
'http://localhost:7000/techdocs/api/cookie',
'http://localhost:7000/techdocs/api/.backstage/v1-cookie',
{ credentials: 'include' },
),
);