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:
parent
297f8071da
commit
3f6574bb98
@ -28,7 +28,7 @@ namespace Bit.Core.Test.Services
|
|||||||
public class OrganizationServiceTests
|
public class OrganizationServiceTests
|
||||||
{
|
{
|
||||||
// [Fact]
|
// [Fact]
|
||||||
[Theory, PaidOrganizationAutoData(PlanType.EnterpriseAnnually)]
|
[Theory, PaidOrganizationAutoData]
|
||||||
public async Task OrgImportCreateNewUsers(SutProvider<OrganizationService> sutProvider, Guid userId,
|
public async Task OrgImportCreateNewUsers(SutProvider<OrganizationService> sutProvider, Guid userId,
|
||||||
Organization org, List<OrganizationUserUserDetails> existingUsers, List<ImportedOrganizationUser> newUsers)
|
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));
|
.CreateManyAsync(Arg.Is<IEnumerable<OrganizationUser>>(users => users.Count() == expectedNewUsersCount));
|
||||||
await sutProvider.GetDependency<IMailService>().Received(1)
|
await sutProvider.GetDependency<IMailService>().Received(1)
|
||||||
.BulkSendOrganizationInviteEmailAsync(org.Name,
|
.BulkSendOrganizationInviteEmailAsync(org.Name,
|
||||||
true,
|
Arg.Any<bool>(),
|
||||||
Arg.Is<IEnumerable<(OrganizationUser, ExpiringToken)>>(messages => messages.Count() == expectedNewUsersCount));
|
Arg.Is<IEnumerable<(OrganizationUser, ExpiringToken)>>(messages => messages.Count() == expectedNewUsersCount));
|
||||||
|
|
||||||
// Send events
|
// Send events
|
||||||
@ -125,7 +125,7 @@ namespace Bit.Core.Test.Services
|
|||||||
.CreateManyAsync(Arg.Is<IEnumerable<OrganizationUser>>(users => users.Count() == expectedNewUsersCount));
|
.CreateManyAsync(Arg.Is<IEnumerable<OrganizationUser>>(users => users.Count() == expectedNewUsersCount));
|
||||||
await sutProvider.GetDependency<IMailService>().Received(1)
|
await sutProvider.GetDependency<IMailService>().Received(1)
|
||||||
.BulkSendOrganizationInviteEmailAsync(org.Name,
|
.BulkSendOrganizationInviteEmailAsync(org.Name,
|
||||||
false,
|
Arg.Any<bool>(),
|
||||||
Arg.Is<IEnumerable<(OrganizationUser, ExpiringToken)>>(messages => messages.Count() == expectedNewUsersCount));
|
Arg.Is<IEnumerable<(OrganizationUser, ExpiringToken)>>(messages => messages.Count() == expectedNewUsersCount));
|
||||||
|
|
||||||
// Sent events
|
// Sent events
|
||||||
|
Loading…
Reference in New Issue
Block a user