mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[PM-19811] fix ResetPasswordEnrolled check to handle empty and whitespace strings. (#5599)
This commit is contained in:
@ -25,11 +25,16 @@ public class MemberResponseModelTests
|
||||
Assert.True(sut.ResetPasswordEnrolled);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ResetPasswordEnrolled_ShouldBeFalse_WhenUserDoesNotHaveResetPasswordKey()
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
[InlineData(" ")]
|
||||
public void ResetPasswordEnrolled_ShouldBeFalse_WhenResetPasswordKeyIsInvalid(string? resetPasswordKey)
|
||||
{
|
||||
// Arrange
|
||||
var user = Substitute.For<OrganizationUser>();
|
||||
user.ResetPasswordKey = resetPasswordKey;
|
||||
|
||||
var collections = Substitute.For<IEnumerable<CollectionAccessSelection>>();
|
||||
|
||||
// Act
|
||||
|
Reference in New Issue
Block a user