mirror of
https://github.com/bitwarden/server.git
synced 2024-11-28 13:15:12 +01:00
3eb4d547a8
* Upgraded old 2019 plans to have the same features as 2020 and beyond * Removed redundant test and moved additional test cases to GetByOrgIdAsync_SmNoneFreePlans_ReturnsNull * Fixed issue where feature flag wasn't returning correct plans * Added teams 2010 plan * Reverted accidental change to StripePaymentService * Split feature flag logic and added some explanatory comments * Removed families changes * Resolved issue where Teams Starter could not sign up for a new org with SM enabled * Fixed issue with signing up for SM with Teams Starter * Resolved issue where an active plan could increase their SM seat count to be greater than the base seats in the password manager plan * Updated unit test to ensure Seats are higher than SmSeats * Resolved issue where getting plans would return a value that LINQ previously cached when feature flag was in a different state
32 lines
786 B
C#
32 lines
786 B
C#
using Bit.Core.Enums;
|
|
using Bit.Core.Utilities;
|
|
using Xunit;
|
|
|
|
namespace Bit.Core.Test.Utilities;
|
|
|
|
|
|
public class StaticStoreTests
|
|
{
|
|
[Fact]
|
|
public void StaticStore_Initialization_Success()
|
|
{
|
|
var plans = StaticStore.Plans.ToList();
|
|
Assert.NotNull(plans);
|
|
Assert.NotEmpty(plans);
|
|
Assert.Equal(17, plans.Count);
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData(PlanType.EnterpriseAnnually)]
|
|
[InlineData(PlanType.EnterpriseMonthly)]
|
|
[InlineData(PlanType.TeamsMonthly)]
|
|
[InlineData(PlanType.TeamsAnnually)]
|
|
[InlineData(PlanType.TeamsStarter)]
|
|
public void StaticStore_GetPlan_Success(PlanType planType)
|
|
{
|
|
var plan = StaticStore.GetPlan(planType);
|
|
Assert.NotNull(plan);
|
|
Assert.Equal(planType, plan.Type);
|
|
}
|
|
}
|