1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 17:42:49 -05:00

Add is sponsored item to subscription response

This commit is contained in:
Matt Gibson
2021-11-10 18:05:31 -05:00
parent 0ae3f1c67e
commit 77fe21a332
5 changed files with 14 additions and 6 deletions

View File

@ -393,10 +393,10 @@ namespace Bit.Api.Test.Controllers
.GetBySponsoringOrganizationUserIdAsync(orgUser.Id)
.Returns((OrganizationSponsorship)sponsorship);
var exception = await Assert.ThrowsAsync<BadRequestException>(() =>
sutProvider.Sut.RevokeSponsorship(orgUser.OrganizationId.ToString()));
await sutProvider.Sut.RevokeSponsorship(orgUser.OrganizationId.ToString());
await sutProvider.GetDependency<IOrganizationSponsorshipRepository>().Received(1).DeleteAsync(sponsorship);
Assert.Contains("You are not currently sponsoring an organization.", exception.Message);
await sutProvider.GetDependency<IOrganizationSponsorshipService>()
.DidNotReceiveWithAnyArgs()
.RemoveSponsorshipAsync(default, default);