diff --git a/Services/CO.CDP.OrganisationInformation.Persistence.Tests/DatabaseAuthenticationKeyRepositoryTest.cs b/Services/CO.CDP.OrganisationInformation.Persistence.Tests/DatabaseAuthenticationKeyRepositoryTest.cs index 422d50ed9..6a6982d5d 100644 --- a/Services/CO.CDP.OrganisationInformation.Persistence.Tests/DatabaseAuthenticationKeyRepositoryTest.cs +++ b/Services/CO.CDP.OrganisationInformation.Persistence.Tests/DatabaseAuthenticationKeyRepositoryTest.cs @@ -71,7 +71,7 @@ public async Task ItFindsSavedAuthenticationKeyByNameKeyAndOrganisationId() } [Fact] - public void ItRejectsTwoApiKeyWithTheSameName() + public async Task ItRejectsTwoApiKeyWithTheSameName() { using var repository = AuthenticationKeyRepository(); var organisation = GivenOrganisation(); @@ -79,9 +79,9 @@ public void ItRejectsTwoApiKeyWithTheSameName() var authenticationKey1 = GivenAuthenticationKey(name: "fts", key: key, organisation: organisation); var authenticationKey2 = GivenAuthenticationKey(name: "fts", key: key, organisation: organisation); - repository.Save(authenticationKey1); + await repository.Save(authenticationKey1); - repository.Invoking(async r => await r.Save(authenticationKey2)) + await repository.Invoking(async r => await r.Save(authenticationKey2)) .Should().ThrowAsync() .WithMessage($"Authentication Key with name `fts` already exists."); }