mirror of
https://github.com/bitwarden/server.git
synced 2025-07-15 22:57:44 -05:00
Rename to include async suffix
This commit is contained in:
@ -25,7 +25,7 @@ public class UsersControllerTests
|
||||
SutProvider<UsersController> sutProvider)
|
||||
{
|
||||
sutProvider.GetDependency<IUserRepository>().GetPublicKeyAsync(Arg.Any<Guid>()).ReturnsNull();
|
||||
await Assert.ThrowsAsync<NotFoundException>(() => sutProvider.Sut.GetPublicKey(new Guid().ToString()));
|
||||
await Assert.ThrowsAsync<NotFoundException>(() => sutProvider.Sut.GetPublicKeyAsync(new Guid().ToString()));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@ -34,7 +34,7 @@ public class UsersControllerTests
|
||||
SutProvider<UsersController> sutProvider)
|
||||
{
|
||||
sutProvider.GetDependency<IUserRepository>().GetByIdAsync(Arg.Any<Guid>()).ReturnsNull();
|
||||
await Assert.ThrowsAsync<NotFoundException>(() => sutProvider.Sut.GetAccountKeys(new Guid().ToString()));
|
||||
await Assert.ThrowsAsync<NotFoundException>(() => sutProvider.Sut.GetAccountKeysAsync(new Guid().ToString()));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@ -53,7 +53,7 @@ public class UsersControllerTests
|
||||
sutProvider.GetDependency<IUserRepository>().GetByIdAsync(userId).Returns(user);
|
||||
sutProvider.GetDependency<IUserSignatureKeyPairRepository>().GetByUserIdAsync(userId).Returns(new SignatureKeyPairData(SignatureAlgorithm.Ed25519, "wrappedSigningKey", "verifyingKey"));
|
||||
|
||||
var result = await sutProvider.Sut.GetAccountKeys(userId.ToString());
|
||||
var result = await sutProvider.Sut.GetAccountKeysAsync(userId.ToString());
|
||||
Assert.NotNull(result);
|
||||
Assert.Equal("publicKey", result.PublicKey);
|
||||
Assert.Equal("signedPublicKey", result.SignedPublicKey);
|
||||
@ -76,7 +76,7 @@ public class UsersControllerTests
|
||||
sutProvider.GetDependency<IUserRepository>().GetByIdAsync(userId).Returns(user);
|
||||
sutProvider.GetDependency<IUserSignatureKeyPairRepository>().GetByUserIdAsync(userId).ReturnsNull();
|
||||
|
||||
var result = await sutProvider.Sut.GetAccountKeys(userId.ToString());
|
||||
var result = await sutProvider.Sut.GetAccountKeysAsync(userId.ToString());
|
||||
Assert.NotNull(result);
|
||||
Assert.Equal("publicKey", result.PublicKey);
|
||||
Assert.Null(result.SignedPublicKey);
|
||||
|
Reference in New Issue
Block a user