1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00

Fix unit tests

This commit is contained in:
Justin Baur 2021-11-18 08:53:49 -05:00
parent 297f8071da
commit 3f6574bb98

View File

@ -28,7 +28,7 @@ namespace Bit.Core.Test.Services
public class OrganizationServiceTests
{
// [Fact]
[Theory, PaidOrganizationAutoData(PlanType.EnterpriseAnnually)]
[Theory, PaidOrganizationAutoData]
public async Task OrgImportCreateNewUsers(SutProvider<OrganizationService> sutProvider, Guid userId,
Organization org, List<OrganizationUserUserDetails> existingUsers, List<ImportedOrganizationUser> newUsers)
{
@ -66,7 +66,7 @@ namespace Bit.Core.Test.Services
.CreateManyAsync(Arg.Is<IEnumerable<OrganizationUser>>(users => users.Count() == expectedNewUsersCount));
await sutProvider.GetDependency<IMailService>().Received(1)
.BulkSendOrganizationInviteEmailAsync(org.Name,
true,
Arg.Any<bool>(),
Arg.Is<IEnumerable<(OrganizationUser, ExpiringToken)>>(messages => messages.Count() == expectedNewUsersCount));
// Send events
@ -125,7 +125,7 @@ namespace Bit.Core.Test.Services
.CreateManyAsync(Arg.Is<IEnumerable<OrganizationUser>>(users => users.Count() == expectedNewUsersCount));
await sutProvider.GetDependency<IMailService>().Received(1)
.BulkSendOrganizationInviteEmailAsync(org.Name,
false,
Arg.Any<bool>(),
Arg.Is<IEnumerable<(OrganizationUser, ExpiringToken)>>(messages => messages.Count() == expectedNewUsersCount));
// Sent events