From 6dab6d34287df7f5432e21a74086a3cc886373a5 Mon Sep 17 00:00:00 2001 From: Justin Baur Date: Mon, 15 Nov 2021 14:47:23 -0500 Subject: [PATCH] Fix tests --- .../Services/OrganizationSponsorshipServiceTests.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/Core.Test/Services/OrganizationSponsorshipServiceTests.cs b/test/Core.Test/Services/OrganizationSponsorshipServiceTests.cs index 162cb2a6e..cf43ed1df 100644 --- a/test/Core.Test/Services/OrganizationSponsorshipServiceTests.cs +++ b/test/Core.Test/Services/OrganizationSponsorshipServiceTests.cs @@ -73,7 +73,7 @@ namespace Bit.Core.Test.Services await sutProvider.GetDependency().Received(1). SendFamiliesForEnterpriseOfferEmailAsync(sponsoredEmail, sponsoringOrg.Name, - Arg.Any()); + false, Arg.Any()); } [Theory] @@ -104,10 +104,14 @@ namespace Bit.Core.Test.Services public async Task SendSponsorshipOfferAsync(Organization org, OrganizationSponsorship sponsorship, SutProvider sutProvider) { + sutProvider.GetDependency() + .GetByEmailAsync(sponsorship.OfferedToEmail) + .Returns(Task.FromResult(new User())); + await sutProvider.Sut.SendSponsorshipOfferAsync(org, sponsorship); await sutProvider.GetDependency().Received(1) - .SendFamiliesForEnterpriseOfferEmailAsync(sponsorship.OfferedToEmail, org.Name, Arg.Any()); + .SendFamiliesForEnterpriseOfferEmailAsync(sponsorship.OfferedToEmail, org.Name, true, Arg.Any()); } private async Task AssertRemovedSponsoredPaymentAsync(Organization sponsoredOrg,