mirror of
https://github.com/bitwarden/server.git
synced 2026-01-31 22:23:18 +08:00
fix: fixing tests and dotnet format
This commit is contained in:
@@ -83,7 +83,7 @@ public class SendEmailOtpRequestValidatorIntegrationTests(IdentityApplicationFac
|
||||
// Assert
|
||||
var content = await response.Content.ReadAsStringAsync();
|
||||
Assert.Contains(OidcConstants.TokenErrors.InvalidRequest, content);
|
||||
Assert.Contains("email otp sent", content);
|
||||
Assert.Contains("email and otp are required", content);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -63,7 +63,7 @@ public class SendNeverAuthenticateRequestValidatorIntegrationTests(
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SendAccess_NeverAuthenticateSend_WithEmail_ReturnsEmailInvalid()
|
||||
public async Task SendAccess_NeverAuthenticateSend_WithEmail_ReturnsEmailAndOtpRequired()
|
||||
{
|
||||
// Arrange
|
||||
var email = "test@example.com";
|
||||
@@ -77,10 +77,10 @@ public class SendNeverAuthenticateRequestValidatorIntegrationTests(
|
||||
var content = await response.Content.ReadAsStringAsync();
|
||||
|
||||
// should be invalid grant
|
||||
Assert.Contains(OidcConstants.TokenErrors.InvalidGrant, content);
|
||||
Assert.Contains(OidcConstants.TokenErrors.InvalidRequest, content);
|
||||
|
||||
// Try to compel the invalid email error
|
||||
var expectedError = SendAccessConstants.EmailOtpValidatorResults.EmailInvalid;
|
||||
var expectedError = SendAccessConstants.EmailOtpValidatorResults.EmailAndOtpRequired;
|
||||
Assert.Contains(expectedError, content);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user