@@ -12,7 +12,7 @@ import * as journey from "../../journey/journey.js";
1212import { createMockRequest } from "../../../../../test/helpers/mock-request-helper.js" ;
1313import esmock from "esmock" ;
1414import type { SinonSpy } from "sinon" ;
15- import type { ExpressRouteFunc } from "../../../../types" ;
15+ import type { ExpressRouteFunc } from "../../../../types.js " ;
1616
1717describe ( "send mfa controller" , ( ) => {
1818 let req : RequestOutput ;
@@ -47,7 +47,7 @@ describe("send mfa controller", () => {
4747 } ) ;
4848
4949 describe ( "sendMfaGeneric" , ( ) => {
50- it ( "can send the journeyType when requesting the code" , async ( ) => {
50+ it ( "can send the journeyType and activeMfaMethodId when requesting the code" , async ( ) => {
5151 const fakeService : MfaServiceInterface = {
5252 sendMfaCode : sinon . fake . returns ( {
5353 success : true ,
@@ -58,6 +58,7 @@ describe("send mfa controller", () => {
5858 req . session . user = {
5959 email : "test@test.com" ,
6060 reauthenticate : "test_data" ,
61+ activeMfaMethodId : "active_mfa_method_id" ,
6162 } ;
6263 req . path = PATH_NAMES . RESEND_MFA_CODE ;
6364
@@ -79,6 +80,7 @@ describe("send mfa controller", () => {
7980 sinon . match . any ,
8081 sinon . match . any ,
8182 sinon . match . any ,
83+ "active_mfa_method_id" ,
8284 JOURNEY_TYPE . REAUTHENTICATION
8385 ) ;
8486 } ) ;
@@ -122,6 +124,7 @@ describe("send mfa controller", () => {
122124 sinon . match . any ,
123125 sinon . match . any ,
124126 sinon . match . any ,
127+ sinon . match . any ,
125128 undefined
126129 ) ;
127130 } ) ;
@@ -165,6 +168,7 @@ describe("send mfa controller", () => {
165168 sinon . match . any ,
166169 sinon . match . any ,
167170 sinon . match . any ,
171+ sinon . match . any ,
168172 JOURNEY_TYPE . REAUTHENTICATION
169173 ) ;
170174 } ) ;
0 commit comments