mirror of
https://github.com/bitwarden/server.git
synced 2025-05-20 19:14:32 -05:00
Fix format of StripePaymentService tests (#1794)
This commit is contained in:
parent
73b3b9b0c9
commit
9086db3b0d
@ -151,7 +151,7 @@ namespace Bit.Core.Test.Services
|
|||||||
});
|
});
|
||||||
sutProvider.GetDependency<ITaxRateRepository>().GetByLocationAsync(Arg.Is<TaxRate>(t =>
|
sutProvider.GetDependency<ITaxRateRepository>().GetByLocationAsync(Arg.Is<TaxRate>(t =>
|
||||||
t.Country == taxInfo.BillingAddressCountry && t.PostalCode == taxInfo.BillingAddressPostalCode))
|
t.Country == taxInfo.BillingAddressCountry && t.PostalCode == taxInfo.BillingAddressPostalCode))
|
||||||
.Returns(new List<TaxRate>{ new() { Id = "T-1"}});
|
.Returns(new List<TaxRate> { new() { Id = "T-1" } });
|
||||||
|
|
||||||
var result = await sutProvider.Sut.PurchaseOrganizationAsync(organization, PaymentMethodType.Card, paymentToken, plan, 0, 0, false, taxInfo);
|
var result = await sutProvider.Sut.PurchaseOrganizationAsync(organization, PaymentMethodType.Card, paymentToken, plan, 0, 0, false, taxInfo);
|
||||||
|
|
||||||
@ -363,14 +363,14 @@ namespace Bit.Core.Test.Services
|
|||||||
});
|
});
|
||||||
stripeAdapter.InvoiceUpcomingAsync(default).ReturnsForAnyArgs(new Stripe.Invoice
|
stripeAdapter.InvoiceUpcomingAsync(default).ReturnsForAnyArgs(new Stripe.Invoice
|
||||||
{
|
{
|
||||||
PaymentIntent = new Stripe.PaymentIntent {Status = "requires_payment_method",},
|
PaymentIntent = new Stripe.PaymentIntent { Status = "requires_payment_method", },
|
||||||
AmountDue = 0
|
AmountDue = 0
|
||||||
});
|
});
|
||||||
stripeAdapter.SubscriptionCreateAsync(default).ReturnsForAnyArgs(new Stripe.Subscription { });
|
stripeAdapter.SubscriptionCreateAsync(default).ReturnsForAnyArgs(new Stripe.Subscription { });
|
||||||
|
|
||||||
var plan = StaticStore.Plans.First(p => p.Type == PlanType.EnterpriseAnnually);
|
var plan = StaticStore.Plans.First(p => p.Type == PlanType.EnterpriseAnnually);
|
||||||
var result = await sutProvider.Sut.UpgradeFreeOrganizationAsync(organization, plan, 0, 0, false, taxInfo);
|
var result = await sutProvider.Sut.UpgradeFreeOrganizationAsync(organization, plan, 0, 0, false, taxInfo);
|
||||||
|
|
||||||
Assert.Null(result);
|
Assert.Null(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user