Skip to content

Commit

Permalink
Update the other test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hinton committed Oct 13, 2023
1 parent 21e19b2 commit ba90b92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/Api.Test/Controllers/AccountsControllerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public async Task PostPrelogin_WhenUserExists_ShouldReturnUserKdfInfo()
}

[Fact]
public async Task PostPrelogin_WhenUserDoesNotExist_ShouldDefaultToSha256And600000Iterations()
public async Task PostPrelogin_WhenUserDoesNotExist_ShouldDefaultToPBKDF()
{
_userRepository.GetKdfInformationByEmailAsync(Arg.Any<string>()).Returns(Task.FromResult((UserKdfInformation)null));

Expand Down
4 changes: 2 additions & 2 deletions test/Identity.Test/Controllers/AccountsControllerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ public async Task PostPrelogin_WhenUserExists_ShouldReturnUserKdfInfo()
}

[Fact]
public async Task PostPrelogin_WhenUserDoesNotExist_ShouldDefaultToSha256And100000Iterations()
public async Task PostPrelogin_WhenUserDoesNotExist_ShouldDefaultToPBKDF()
{
_userRepository.GetKdfInformationByEmailAsync(Arg.Any<string>()).Returns(Task.FromResult<UserKdfInformation>(null!));

var response = await _sut.PostPrelogin(new PreloginRequestModel { Email = "[email protected]" });

Assert.Equal(KdfType.PBKDF2_SHA256, response.Kdf);
Assert.Equal(100000, response.KdfIterations);
Assert.Equal(600000, response.KdfIterations);
}

[Fact]
Expand Down

0 comments on commit ba90b92

Please sign in to comment.