2024-06-11 19:55:23 +02:00
|
|
|
|
using Bit.Core.Billing.Models;
|
2022-06-28 18:17:14 +02:00
|
|
|
|
using Xunit;
|
|
|
|
|
|
2024-06-11 19:55:23 +02:00
|
|
|
|
namespace Bit.Core.Test.Billing.Models;
|
2022-08-29 22:06:55 +02:00
|
|
|
|
|
2022-06-28 18:17:14 +02:00
|
|
|
|
public class BillingInfoTests
|
|
|
|
|
{
|
2022-08-29 22:06:55 +02:00
|
|
|
|
[Fact]
|
2022-06-28 18:17:14 +02:00
|
|
|
|
public void BillingInvoice_Amount_ShouldComeFrom_InvoiceTotal()
|
|
|
|
|
{
|
|
|
|
|
var invoice = new Stripe.Invoice
|
|
|
|
|
{
|
|
|
|
|
AmountDue = 1000,
|
|
|
|
|
Total = 2000,
|
|
|
|
|
};
|
|
|
|
|
|
2024-06-11 19:55:23 +02:00
|
|
|
|
var billingInvoice = new BillingHistoryInfo.BillingInvoice(invoice);
|
2022-06-28 18:17:14 +02:00
|
|
|
|
|
|
|
|
|
// Should have been set from Total
|
|
|
|
|
Assert.Equal(20M, billingInvoice.Amount);
|
|
|
|
|
}
|
|
|
|
|
}
|