Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bitwarden_license/src/Scim/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
},
"storage": {
"connectionString": "UseDevelopmentStorage=true"
}
},
"pricingUri": "https://billingpricing.qa.bitwarden.pw"
}
}
3 changes: 2 additions & 1 deletion bitwarden_license/src/Sso/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"storage": {
"connectionString": "UseDevelopmentStorage=true"
},
"developmentDirectory": "../../../dev"
"developmentDirectory": "../../../dev",
"pricingUri": "https://billingpricing.qa.bitwarden.pw"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
using Bit.Core.Exceptions;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Utilities;
using Bit.Core.Test.Billing.Mocks;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
using NSubstitute;
Expand Down Expand Up @@ -207,7 +207,7 @@ public async Task RemoveOrganizationFromProvider_OrganizationStripeEnabled_Conso

organization.PlanType = PlanType.TeamsMonthly;

var teamsMonthlyPlan = StaticStore.GetPlan(PlanType.TeamsMonthly);
var teamsMonthlyPlan = MockPlans.Get(PlanType.TeamsMonthly);

sutProvider.GetDependency<IPricingClient>().GetPlanOrThrow(PlanType.TeamsMonthly).Returns(teamsMonthlyPlan);

Expand Down Expand Up @@ -296,7 +296,7 @@ public async Task RemoveOrganizationFromProvider_OrganizationStripeEnabled_Conso

organization.PlanType = PlanType.TeamsMonthly;

var teamsMonthlyPlan = StaticStore.GetPlan(PlanType.TeamsMonthly);
var teamsMonthlyPlan = MockPlans.Get(PlanType.TeamsMonthly);

sutProvider.GetDependency<IPricingClient>().GetPlanOrThrow(PlanType.TeamsMonthly).Returns(teamsMonthlyPlan);

Expand Down Expand Up @@ -416,7 +416,7 @@ public async Task RemoveOrganizationFromProvider_DisabledOrganization_Consolidat
organization.PlanType = PlanType.TeamsMonthly;
organization.Enabled = false; // Start with a disabled organization

var teamsMonthlyPlan = StaticStore.GetPlan(PlanType.TeamsMonthly);
var teamsMonthlyPlan = MockPlans.Get(PlanType.TeamsMonthly);

sutProvider.GetDependency<IPricingClient>().GetPlanOrThrow(PlanType.TeamsMonthly).Returns(teamsMonthlyPlan);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Core.Test.Billing.Mocks;
using Bit.Core.Tokens;
using Bit.Core.Utilities;
using Bit.Test.Common.AutoFixture;
Expand Down Expand Up @@ -811,12 +812,12 @@ public async Task AddOrganization_CreateBeforeNov62023_PlanTypeUpdated(Provider
organization.Plan = "Enterprise (Monthly)";

sutProvider.GetDependency<IPricingClient>().GetPlanOrThrow(organization.PlanType)
.Returns(StaticStore.GetPlan(organization.PlanType));
.Returns(MockPlans.Get(organization.PlanType));

var expectedPlanType = PlanType.EnterpriseMonthly2020;

sutProvider.GetDependency<IPricingClient>().GetPlanOrThrow(expectedPlanType)
.Returns(StaticStore.GetPlan(expectedPlanType));
.Returns(MockPlans.Get(expectedPlanType));

var expectedPlanId = "2020-enterprise-org-seat-monthly";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Bit.Core.Test.Billing.Mocks;
using Bit.Core.Utilities;
using Bit.Test.Common.AutoFixture.Attributes;
using Microsoft.AspNetCore.DataProtection;
Expand Down Expand Up @@ -72,7 +73,7 @@ public async Task FinalizeConversion_Succeeds_ReturnsProviderId(
{
organization.PlanType = PlanType.EnterpriseAnnually2020;

var enterpriseAnnually2020 = StaticStore.GetPlan(PlanType.EnterpriseAnnually2020);
var enterpriseAnnually2020 = MockPlans.Get(PlanType.EnterpriseAnnually2020);

var subscription = new Subscription
{
Expand Down Expand Up @@ -134,7 +135,7 @@ public async Task FinalizeConversion_Succeeds_ReturnsProviderId(
_pricingClient.GetPlanOrThrow(PlanType.EnterpriseAnnually2020)
.Returns(enterpriseAnnually2020);

var enterpriseAnnually = StaticStore.GetPlan(PlanType.EnterpriseAnnually);
var enterpriseAnnually = MockPlans.Get(PlanType.EnterpriseAnnually);

_pricingClient.GetPlanOrThrow(PlanType.EnterpriseAnnually)
.Returns(enterpriseAnnually);
Expand Down Expand Up @@ -242,7 +243,7 @@ public async Task InitiateConversion_Succeeds_ReturnsProviderId(
argument.Status == ProviderStatusType.Pending &&
argument.Type == ProviderType.BusinessUnit)).Returns(provider);

var plan = StaticStore.GetPlan(organization.PlanType);
var plan = MockPlans.Get(organization.PlanType);

_pricingClient.GetPlanOrThrow(organization.PlanType).Returns(plan);

Expand Down
Loading
Loading