diff --git a/test/Billing.Test/Services/SetupIntentSucceededHandlerTests.cs b/test/Billing.Test/Services/SetupIntentSucceededHandlerTests.cs index ab3d533656..e9f0d9d0ed 100644 --- a/test/Billing.Test/Services/SetupIntentSucceededHandlerTests.cs +++ b/test/Billing.Test/Services/SetupIntentSucceededHandlerTests.cs @@ -222,38 +222,6 @@ public class SetupIntentSucceededHandlerTests await _pushNotificationAdapter.DidNotReceiveWithAnyArgs().NotifyBankAccountVerifiedAsync(Arg.Any()); } - [Fact] - public async Task HandleAsync_OrganizationNotFound_DoesNotSendNotification() - { - // Arrange - var subscriberId = Guid.NewGuid(); - var setupIntent = CreateSetupIntent(); - - _stripeEventService.GetSetupIntent( - _mockEvent, - true, - Arg.Is>(options => options.SequenceEqual(_expand))) - .Returns(setupIntent); - - _setupIntentCache.GetSubscriberIdForSetupIntent(setupIntent.Id) - .Returns(subscriberId); - - _organizationRepository.GetByIdAsync(subscriberId) - .Returns((Organization?)null); - - _providerRepository.GetByIdAsync(subscriberId) - .Returns((Provider?)null); - - // Act - await _handler.HandleAsync(_mockEvent); - - // Assert - await _stripeAdapter.DidNotReceiveWithAnyArgs().PaymentMethodAttachAsync( - Arg.Any(), Arg.Any()); - await _pushNotificationAdapter.DidNotReceiveWithAnyArgs().NotifyBankAccountVerifiedAsync(Arg.Any()); - await _pushNotificationAdapter.DidNotReceiveWithAnyArgs().NotifyBankAccountVerifiedAsync(Arg.Any()); - } - private static SetupIntent CreateSetupIntent(bool hasUSBankAccount = true) { var paymentMethod = new PaymentMethod