mirror of
https://github.com/bitwarden/server
synced 2026-01-06 10:34:01 +00:00
[PM-23687] Support free organizations on Payment Details page (#6084)
* Resolve JSON serialization bug in OneOf converters and organize pricing models * Support free organizations for payment method and billing address flows * Run dotnet format
This commit is contained in:
@@ -25,6 +25,27 @@ public class MaskedPaymentMethodTests
|
||||
Assert.Equivalent(input.AsT0, output.AsT0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Write_Read_BankAccount_WithOptions_Succeeds()
|
||||
{
|
||||
MaskedPaymentMethod input = new MaskedBankAccount
|
||||
{
|
||||
BankName = "Chase",
|
||||
Last4 = "9999",
|
||||
Verified = true
|
||||
};
|
||||
|
||||
var jsonSerializerOptions = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
|
||||
|
||||
var json = JsonSerializer.Serialize(input, jsonSerializerOptions);
|
||||
|
||||
var output = JsonSerializer.Deserialize<MaskedPaymentMethod>(json, jsonSerializerOptions);
|
||||
Assert.NotNull(output);
|
||||
Assert.True(output.IsT0);
|
||||
|
||||
Assert.Equivalent(input.AsT0, output.AsT0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Write_Read_Card_Succeeds()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user