mirror of
https://github.com/bitwarden/server.git
synced 2025-06-28 06:36:15 -05:00
wip
This commit is contained in:
parent
04383a82a1
commit
2cac1c82d0
@ -234,7 +234,7 @@ public class ImportOrganizationUserCommand : IImportOrganizationUserCommand
|
|||||||
{
|
{
|
||||||
var plan = await _pricingClient.GetPlanOrThrow(organization.PlanType);
|
var plan = await _pricingClient.GetPlanOrThrow(organization.PlanType);
|
||||||
var inviteOrganization = new InviteOrganization(organization, plan);
|
var inviteOrganization = new InviteOrganization(organization, plan);
|
||||||
var request = new InviteOrganizationUsersRequest(invites.ToArray(), inviteOrganization, Guid.Empty, DateTimeOffset.UtcNow);
|
var request = new InviteOrganizationUsersRequest(invites.ToArray(), inviteOrganization, organization.Id, DateTimeOffset.UtcNow);
|
||||||
|
|
||||||
return await _inviteOrganizationUsersCommand.InviteImportedOrganizationUsersAsync(request, organization.Id);
|
return await _inviteOrganizationUsersCommand.InviteImportedOrganizationUsersAsync(request, organization.Id);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ public class ImportOrganizationUserCommandTests
|
|||||||
invites.Add(new OrganizationUserInviteCommandModel(u.Email + "@test.com", u.ExternalId));
|
invites.Add(new OrganizationUserInviteCommandModel(u.Email + "@test.com", u.ExternalId));
|
||||||
}
|
}
|
||||||
|
|
||||||
var inviteCommandModel = new InviteOrganizationUsersRequest(invites.ToArray(), new InviteOrganization(org, null), Guid.Empty, DateTimeOffset.UtcNow);
|
var inviteCommandModel = new InviteOrganizationUsersRequest(invites.ToArray(), new InviteOrganization(org, null), org.Id, DateTimeOffset.UtcNow);
|
||||||
|
|
||||||
newUsers.Add(new ImportedOrganizationUser
|
newUsers.Add(new ImportedOrganizationUser
|
||||||
{
|
{
|
||||||
@ -74,7 +74,7 @@ public class ImportOrganizationUserCommandTests
|
|||||||
await sutProvider.GetDependency<IInviteOrganizationUsersCommand>().Received(1)
|
await sutProvider.GetDependency<IInviteOrganizationUsersCommand>().Received(1)
|
||||||
.InviteImportedOrganizationUsersAsync(Arg.Is<InviteOrganizationUsersRequest>(
|
.InviteImportedOrganizationUsersAsync(Arg.Is<InviteOrganizationUsersRequest>(
|
||||||
// These are the invites that should get populated from the CommandResult response above
|
// These are the invites that should get populated from the CommandResult response above
|
||||||
request => request.Invites.Count() == 0
|
request => request.Invites.Count() == expectedNewUsersCount
|
||||||
), org.Id);
|
), org.Id);
|
||||||
await sutProvider.GetDependency<IOrganizationUserRepository>().DidNotReceiveWithAnyArgs()
|
await sutProvider.GetDependency<IOrganizationUserRepository>().DidNotReceiveWithAnyArgs()
|
||||||
.UpsertAsync(default);
|
.UpsertAsync(default);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user