Skip to content

Commit

Permalink
unit test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
handesirikci0rso committed Mar 28, 2024
1 parent 3f3cdaf commit d2c0f7f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public async Task Should_Throw_Authentication_Exception_If_Password_Is_not_Valid
{
// Act
Func<Task> func = async () => await _handler.Handle(command, new CancellationToken());
_cookieSignIn.IsCookieSignInPossible(Arg.Any<User>(), Arg.Any<string>()).Returns(false);

// Assert
_ = func.Should().ThrowAsync<AuthenticationException>().WithMessage("The system could not log you in. Please enter a valid user name and password");
Expand All @@ -79,6 +80,7 @@ public async Task Should_Throw_Authentication_Exception_If_Password_Is_not_Valid

// Act
Func<Task> func1 = async () => await _handler.Handle(command, new CancellationToken());
_cookieSignIn.IsCookieSignInPossible(Arg.Any<User>(), Arg.Any<string>()).Returns(true);

// Assert
_ = func1.Should().ThrowAsync<AuthorizationException>().WithMessage("Your account is locked out. Kindly wait for 10 minutes and try again");
Expand Down

0 comments on commit d2c0f7f

Please sign in to comment.