1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

[AC-2706] [Defect] ProviderId does not populate when payment for provider subscription is created/updated (#4138)

* Resolve the issue of not updating the db

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Resolve the failing test

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
cyprain-okeke
2024-05-29 18:49:19 +01:00
committed by GitHub
parent 9da75fc78f
commit f73b7c7fa8
3 changed files with 24 additions and 5 deletions

View File

@ -2,6 +2,7 @@
using Bit.Billing.Controllers;
using Bit.Billing.Test.Utilities;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Repositories;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Repositories;
@ -32,6 +33,7 @@ public class PayPalControllerTests
private readonly IPaymentService _paymentService = Substitute.For<IPaymentService>();
private readonly ITransactionRepository _transactionRepository = Substitute.For<ITransactionRepository>();
private readonly IUserRepository _userRepository = Substitute.For<IUserRepository>();
private readonly IProviderRepository _providerRepository = Substitute.For<IProviderRepository>();
private const string _defaultWebhookKey = "webhook-key";
@ -110,7 +112,7 @@ public class PayPalControllerTests
HasStatusCode(result, 400);
LoggedError(logger, "PayPal IPN (2PK15573S8089712Y): 'custom' did not contain a User ID or Organization ID");
LoggedError(logger, "PayPal IPN (2PK15573S8089712Y): 'custom' did not contain a User ID or Organization ID or provider ID");
}
[Fact]
@ -542,7 +544,8 @@ public class PayPalControllerTests
_organizationRepository,
_paymentService,
_transactionRepository,
_userRepository);
_userRepository,
_providerRepository);
var httpContext = new DefaultHttpContext();