1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

Add resend sponsorship offer api endpoint

This commit is contained in:
Matt Gibson
2021-11-10 17:00:48 -05:00
committed by Justin Baur
parent a605dc7286
commit 32333048b4
5 changed files with 172 additions and 24 deletions

View File

@ -92,5 +92,20 @@ namespace Bit.Core.Test.Services
await sutProvider.GetDependency<IOrganizationSponsorshipRepository>().Received(1)
.DeleteAsync(createdSponsorship);
}
[Theory]
[BitAutoData]
public async Task SendSponsorshipOfferAsync(Organization org, OrganizationSponsorship sponsorship,
SutProvider<OrganizationSponsorshipService> sutProvider)
{
await sutProvider.Sut.SendSponsorshipOfferAsync(org, sponsorship);
await sutProvider.GetDependency<IMailService>().Received(1)
.SendFamiliesForEnterpriseOfferEmailAsync(sponsorship.OfferedToEmail, org.Name, Arg.Any<string>());
}
// TODO: test validateSponsorshipAsync
// TODO: test RemoveSponsorshipAsync
}
}