Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham Dodd committed Sep 10, 2020
1 parent 17bcd52 commit 4ed57cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public virtual Task<AuthFlowResponse> CheckPasswordAsync(TUser user, string pass
/// <param name="code">The 2fa code to check</param>
/// <param name="authWorkflowSessionId">The ongoing Cognito authentication workflow id.</param>
/// <returns>The <see cref="Task"/> that represents the asynchronous operation, containing the AuthFlowResponse object linked to that authentication workflow.</returns>
public virtual Task<AuthFlowResponse> RespondToTwoFactorChallengeAsync2(TUser user, string code, string authWorkflowSessionId)
public virtual Task<AuthFlowResponse> RespondToTwoFactorChallengeAsync(TUser user, string code, string authWorkflowSessionId)
{
return RespondToTwoFactorChallengeAsync(user, code, ChallengeNameType.SMS_MFA, authWorkflowSessionId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public async void Test_GivenAUserWith2FA_WhenRespondToTwoFactorChallengeWithCorr
var context = MockUtils.MockContext(cognitoUser, IdentityConstants.TwoFactorUserIdScheme);
contextAccessorMock.Setup(a => a.HttpContext).Returns(context).Verifiable();

var authFlowResponse = new AuthFlowResponse("sessionId", null, null, null, null);
var authFlowResponse = new AuthFlowResponse("sessionId", null, ChallengeNameType.SMS_MFA, null, null);

userManagerMock.Setup(mock => mock.FindByIdAsync(It.IsAny<string>())).Returns(Task.FromResult(cognitoUser)).Verifiable();
userManagerMock.Setup(mock => mock.RespondToTwoFactorChallengeAsync(It.IsAny<CognitoUser>(), It.IsAny<string>(), It.IsAny<string>()))
Expand Down

0 comments on commit 4ed57cf

Please sign in to comment.