1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-24 12:35:25 +01:00
bitwarden-server/test/Core.Test/AutoFixture/SubscriptionInfoCustomization.cs
Thomas Rittson 82908b1fb7
[EC-826] Merge license sync feature branch to master (#2587)
* [EC-634] Extract GenerateLicenseAsync to a query (#2373)

* [EC-637] Add license sync to server (#2453)

* [EC-1036] Show correct license sync date (#2626)

* Update method name per new pattern
2023-01-31 07:42:10 +10:00

19 lines
615 B
C#

using AutoFixture;
using Bit.Core.Models.Business;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture;
public class SubscriptionInfoCustomizeAttribute : BitCustomizeAttribute
{
public override ICustomization GetCustomization() => new SubscriptionInfoCustomization();
}
public class SubscriptionInfoCustomization : ICustomization
{
public void Customize(IFixture fixture)
{
// The Subscription property uses the external Stripe library, which Autofixture doesn't handle
fixture.Customize<SubscriptionInfo>(c => c.Without(s => s.Subscription));
}
}