diff --git a/src/components/account-not-found/account-not-found-controller.ts b/src/components/account-not-found/account-not-found-controller.ts index f7fcfd890..3fbe7ea90 100644 --- a/src/components/account-not-found/account-not-found-controller.ts +++ b/src/components/account-not-found/account-not-found-controller.ts @@ -61,6 +61,8 @@ export function accountNotFoundPost( throw new BadRequestError(result.data.message, result.data.code); } + req.session.user.isAccountCreationJourney = true; + res.redirect( getNextPathAndUpdateJourney( req, diff --git a/src/components/account-not-found/tests/account-not-found-controller.test.ts b/src/components/account-not-found/tests/account-not-found-controller.test.ts index 162fa003c..b0721e336 100644 --- a/src/components/account-not-found/tests/account-not-found-controller.test.ts +++ b/src/components/account-not-found/tests/account-not-found-controller.test.ts @@ -78,6 +78,7 @@ describe("account not found controller", () => { await accountNotFoundPost(fakeService)(req, res); + expect(req.session.user.isAccountCreationJourney).to.be.true; expect(res.redirect).to.have.calledWith(PATH_NAMES.CHECK_YOUR_EMAIL); expect(fakeService.sendNotification).to.have.been.calledOnce; });