mirror of
https://github.com/bitwarden/server.git
synced 2025-03-11 13:19:40 +01:00
test(recovery-code): [PM-17129] Login with 2FA Recovery Code - Removed stale tests.
This commit is contained in:
parent
45f94fc862
commit
6c0e36fd81
@ -461,59 +461,6 @@ public class DeviceValidatorTests
|
||||
Assert.NotNull(context.Device);
|
||||
}
|
||||
|
||||
// [Theory, BitAutoData]
|
||||
// public async void ValidateRequestDeviceAsync_DeviceNull_RecoveryFlow_ReturnsTrue(
|
||||
// CustomValidatorRequestContext context,
|
||||
// [AuthFixtures.ValidatedTokenRequest] ValidatedTokenRequest request)
|
||||
// {
|
||||
// // Arrange
|
||||
// context.KnownDevice = false;
|
||||
// context.InRecoveryFlowAndValidCode = true;
|
||||
//
|
||||
// _featureService.IsEnabled(FeatureFlagKeys.NewDeviceVerification)
|
||||
// .Returns(true);
|
||||
//
|
||||
// // Act
|
||||
// Assert.NotNull(context.User);
|
||||
// var result = await _sut.ValidateRequestDeviceAsync(request, context);
|
||||
//
|
||||
// // Assert
|
||||
// await _deviceService.Received(1).SaveAsync(Arg.Any<Device>());
|
||||
//
|
||||
// Assert.True(result);
|
||||
// }
|
||||
//
|
||||
// [Theory, BitAutoData]
|
||||
// public async void ValidateRequestDeviceAsync_DeviceNull_InvalidRecoveryFlow_ReturnsFalse(
|
||||
// CustomValidatorRequestContext context,
|
||||
// [AuthFixtures.ValidatedTokenRequest] ValidatedTokenRequest request)
|
||||
// {
|
||||
// // Arrange
|
||||
// context.KnownDevice = false;
|
||||
// context.InRecoveryFlowAndValidCode = false;
|
||||
//
|
||||
// ArrangeForHandleNewDeviceVerificationTest(context, request);
|
||||
// AddValidDeviceToRequest(request);
|
||||
// _deviceRepository.GetByIdentifierAsync(context.Device.Identifier, context.User.Id)
|
||||
// .Returns(null as Device);
|
||||
// _featureService.IsEnabled(FeatureFlagKeys.NewDeviceVerification)
|
||||
// .Returns(true);
|
||||
// _globalSettings.EnableNewDeviceVerification = true;
|
||||
//
|
||||
// // Act
|
||||
// Assert.NotNull(context.User);
|
||||
// var result = await _sut.ValidateRequestDeviceAsync(request, context);
|
||||
//
|
||||
// // Assert
|
||||
// await _deviceService.Received(0).SaveAsync(Arg.Any<Device>());
|
||||
//
|
||||
// Assert.False(result);
|
||||
// Assert.NotNull(context.CustomResponse["ErrorModel"]);
|
||||
// var expectedErrorModel = new ErrorResponseModel("no device information provided");
|
||||
// var actualResponse = (ErrorResponseModel)context.CustomResponse["ErrorModel"];
|
||||
// Assert.Equal(expectedErrorModel.Message, actualResponse.Message);
|
||||
// }
|
||||
|
||||
[Theory, BitAutoData]
|
||||
public async void HandleNewDeviceVerificationAsync_UserNull_ContextModified_ReturnsInvalidUser(
|
||||
CustomValidatorRequestContext context,
|
||||
|
Loading…
Reference in New Issue
Block a user