From b392cc962df8f5f1685b967ee238a89383e23ac7 Mon Sep 17 00:00:00 2001 From: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com> Date: Fri, 14 Jun 2024 13:53:45 +0100 Subject: [PATCH] [AC-2721] [Defect] Apply Subscription Status Updates in Provider Subscription details (#4184) * Resolve the past_due date display issue Signed-off-by: Cy Okeke * Fix the failing test Signed-off-by: Cy Okeke --------- Signed-off-by: Cy Okeke --- .../src/Commercial.Core/Billing/ProviderBillingService.cs | 2 +- .../Billing/ProviderBillingServiceTests.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bitwarden_license/src/Commercial.Core/Billing/ProviderBillingService.cs b/bitwarden_license/src/Commercial.Core/Billing/ProviderBillingService.cs index f54ecf5a6..e32cb4081 100644 --- a/bitwarden_license/src/Commercial.Core/Billing/ProviderBillingService.cs +++ b/bitwarden_license/src/Commercial.Core/Billing/ProviderBillingService.cs @@ -242,7 +242,7 @@ public class ProviderBillingService( var subscription = await subscriberService.GetSubscription(provider, new SubscriptionGetOptions { - Expand = ["customer"] + Expand = ["customer", "test_clock"] }); if (subscription == null) diff --git a/bitwarden_license/test/Commercial.Core.Test/Billing/ProviderBillingServiceTests.cs b/bitwarden_license/test/Commercial.Core.Test/Billing/ProviderBillingServiceTests.cs index f9c59d6b5..c432be51a 100644 --- a/bitwarden_license/test/Commercial.Core.Test/Billing/ProviderBillingServiceTests.cs +++ b/bitwarden_license/test/Commercial.Core.Test/Billing/ProviderBillingServiceTests.cs @@ -719,7 +719,7 @@ public class ProviderBillingServiceTests await sutProvider.GetDependency().Received(1).GetSubscription( provider, Arg.Is( - options => options.Expand.Count == 1 && options.Expand.First() == "customer")); + options => options.Expand.Count == 2 && options.Expand.First() == "customer" && options.Expand.Last() == "test_clock")); } [Theory, BitAutoData] @@ -732,7 +732,7 @@ public class ProviderBillingServiceTests var subscription = new Subscription(); subscriberService.GetSubscription(provider, Arg.Is( - options => options.Expand.Count == 1 && options.Expand.First() == "customer")).Returns(subscription); + options => options.Expand.Count == 2 && options.Expand.First() == "customer" && options.Expand.Last() == "test_clock")).Returns(subscription); var providerPlanRepository = sutProvider.GetDependency();