@@ -153,7 +153,7 @@ func TestHandleAccountOtpPost_NotAuthorized(t *testing.T) {
153
153
154
154
mockAuthHelper .On ("GetLoggedInSubject" , mock .Anything ).Return ("" )
155
155
156
- handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockSessionStore , mockAuditLogger )
156
+ handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockAuditLogger )
157
157
158
158
req , _ := http .NewRequest ("POST" , "/account/otp" , nil )
159
159
rr := httptest .NewRecorder ()
@@ -192,7 +192,7 @@ func TestHandleAccountOtpPost_OtpIsEnabledAndVerifyPasswordHashFails(t *testing.
192
192
data ["otpEnabled" ] == true
193
193
})).Return (nil )
194
194
195
- handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockSessionStore , mockAuditLogger )
195
+ handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockAuditLogger )
196
196
197
197
form := url.Values {}
198
198
form .Add ("password" , "wrongpassword" )
@@ -254,7 +254,7 @@ func TestHandleAccountOtpPost_OtpIsEnabledAndVerifyPasswordHashSucceeds(t *testi
254
254
return us .Level2AuthConfigHasChanged == true
255
255
})).Return (nil )
256
256
257
- handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockSessionStore , mockAuditLogger )
257
+ handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockAuditLogger )
258
258
259
259
form := url.Values {}
260
260
form .Add ("password" , "correctpassword" )
@@ -312,7 +312,7 @@ func TestHandleAccountOtpPost_OtpIsNotEnabledAndPasswordIsInvalid(t *testing.T)
312
312
data ["secretKey" ] == "test_secret"
313
313
})).Return (nil )
314
314
315
- handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockSessionStore , mockAuditLogger )
315
+ handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockAuditLogger )
316
316
317
317
form := url.Values {}
318
318
form .Add ("password" , "correctpassword" )
@@ -370,7 +370,7 @@ func TestHandleAccountOtpPost_OtpIsNotEnabledAndOtpCodeIsInvalid(t *testing.T) {
370
370
data ["secretKey" ] == "test_secret"
371
371
})).Return (nil )
372
372
373
- handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockSessionStore , mockAuditLogger )
373
+ handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockAuditLogger )
374
374
375
375
form := url.Values {}
376
376
form .Add ("password" , "correctpassword" )
@@ -448,7 +448,7 @@ func TestHandleAccountOtpPost_OtpIsNotEnabledAndOtpCodeIsValid(t *testing.T) {
448
448
return us .Level2AuthConfigHasChanged == true
449
449
})).Return (nil )
450
450
451
- handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockSessionStore , mockAuditLogger )
451
+ handler := HandleAccountOtpPost (mockHttpHelper , mockSessionStore , mockAuthHelper , mockDB , mockAuditLogger )
452
452
453
453
otp , err := totp .GenerateCode (otpSecret , time .Now ())
454
454
assert .NoError (t , err )
0 commit comments