Skip to content

Commit

Permalink
Merge pull request #1565 from govuk-one-login/AUT-2689/set-account-cr…
Browse files Browse the repository at this point in the history
…eation-flag

set session registration flag during alternate registration flow
  • Loading branch information
dbes-gds authored Apr 19, 2024
2 parents 792ce5a + 0c39bbe commit 62a84dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down

0 comments on commit 62a84dc

Please sign in to comment.