Skip to content

Commit

Permalink
added test for blank comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dhiren-singh-007 committed Jul 3, 2024
1 parent 4f5bdce commit 61fb903
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,22 @@ public async Task DeclineRegistrationVerification_WithApplicationNotFound_Throws
ex.ParamName.Should().Be("applicationId");
}

[Fact]
public async Task DeclineRegistrationVerification_WithNoComment_ThrowsConflictException()
{
// Arrange
var applicationId = Guid.NewGuid();
A.CallTo(() => _applicationRepository.GetCompanyIdNameForSubmittedApplication(applicationId))
.Returns<(Guid, string, Guid?, IEnumerable<(Guid, string, IdentityProviderTypeId, IEnumerable<Guid>)>, IEnumerable<Guid>)>(default);
Task Act() => _logic.DeclineRegistrationVerification(applicationId, "", CancellationToken.None);

// Act
var ex = await Assert.ThrowsAsync<ConflictException>(Act);

// Assert
ex.Message.Should().Be("No comment set.");
}

[Fact]
public async Task DeclineRegistrationVerification_WithMultipleIdps_CallsExpected()
{
Expand Down

0 comments on commit 61fb903

Please sign in to comment.