1
0
mirror of https://github.com/bitwarden/server synced 2025-12-27 05:33:17 +00:00

Merge branch 'master' into feature/flexible-collections

This commit is contained in:
Thomas Rittson
2023-10-24 11:23:23 +10:00
committed by GitHub
25 changed files with 578 additions and 377 deletions

View File

@@ -3,6 +3,7 @@ using Bit.Billing.Services.Implementations;
using Bit.Billing.Test.Utilities;
using Bit.Core.Settings;
using FluentAssertions;
using Microsoft.Extensions.Logging;
using NSubstitute;
using Stripe;
using Xunit;
@@ -21,7 +22,7 @@ public class StripeEventServiceTests
globalSettings.BaseServiceUri = baseServiceUriSettings;
_stripeFacade = Substitute.For<IStripeFacade>();
_stripeEventService = new StripeEventService(globalSettings, _stripeFacade);
_stripeEventService = new StripeEventService(globalSettings, Substitute.For<ILogger<StripeEventService>>(), _stripeFacade);
}
#region GetCharge

View File

@@ -54,7 +54,7 @@ public class UpdateSecretsManagerSubscriptionCommandTests
var plan = StaticStore.GetPlan(organization.PlanType);
await sutProvider.GetDependency<IPaymentService>().Received(1)
.AdjustSeatsAsync(organization, plan, update.SmSeatsExcludingBase);
.AdjustSmSeatsAsync(organization, plan, update.SmSeatsExcludingBase);
await sutProvider.GetDependency<IPaymentService>().Received(1)
.AdjustServiceAccountsAsync(organization, plan, update.SmServiceAccountsExcludingBase);
@@ -98,7 +98,7 @@ public class UpdateSecretsManagerSubscriptionCommandTests
var plan = StaticStore.GetPlan(organization.PlanType);
await sutProvider.GetDependency<IPaymentService>().Received(1)
.AdjustSeatsAsync(organization, plan, update.SmSeatsExcludingBase);
.AdjustSmSeatsAsync(organization, plan, update.SmSeatsExcludingBase);
await sutProvider.GetDependency<IPaymentService>().Received(1)
.AdjustServiceAccountsAsync(organization, plan, update.SmServiceAccountsExcludingBase);
@@ -599,7 +599,7 @@ public class UpdateSecretsManagerSubscriptionCommandTests
private static async Task VerifyDependencyNotCalledAsync(SutProvider<UpdateSecretsManagerSubscriptionCommand> sutProvider)
{
await sutProvider.GetDependency<IPaymentService>().DidNotReceive()
.AdjustSeatsAsync(Arg.Any<Organization>(), Arg.Any<Plan>(), Arg.Any<int>());
.AdjustSmSeatsAsync(Arg.Any<Organization>(), Arg.Any<Plan>(), Arg.Any<int>());
await sutProvider.GetDependency<IPaymentService>().DidNotReceive()
.AdjustServiceAccountsAsync(Arg.Any<Organization>(), Arg.Any<Plan>(), Arg.Any<int>());
// TODO: call ReferenceEventService - see AC-1481