diff --git a/src/gdprApi/__tests__/useDownloadProfileQueue.test.tsx b/src/gdprApi/__tests__/useDownloadProfileQueue.test.tsx index b25147c00..531aa0506 100644 --- a/src/gdprApi/__tests__/useDownloadProfileQueue.test.tsx +++ b/src/gdprApi/__tests__/useDownloadProfileQueue.test.tsx @@ -733,18 +733,16 @@ describe('useDownloadProfileQueue', () => { tunnistamoAuthCodeRedirectionAction.type, tunnistamoAuthCodeCallbackUrlAction.type ); - expect(getState().currentPhase === currentPhases.running).toBeTruthy(); - expect(getState().nextPhase === nextPhases.resumeCallback).toBeTruthy(); - - expect(getFunctionResults()).toMatchObject({ - ...hookFunctionResultsAsFalse, - isLoading: true, - }); await toggleComponentMounting(); mockedWindowControls.setPath(config.gdprCallbackPath); await toggleComponentMounting(); + expect(getState()).toMatchObject({ + currentPhase: currentPhases.idle, + nextPhase: nextPhases.resumeCallback, + }); + expect(getFunctionResults()).toMatchObject({ ...hookFunctionResultsAsFalse, shouldHandleCallback: true,