mirror of
https://github.com/bitwarden/server.git
synced 2025-12-10 17:45:21 -06:00
Fix failing tests
This commit is contained in:
parent
f37b42e4d2
commit
c827b38572
@ -30,7 +30,7 @@ public class OrganizationUpdateCommandTests
|
||||
var organizationBillingService = sutProvider.GetDependency<IOrganizationBillingService>();
|
||||
|
||||
organization.Id = organizationId;
|
||||
organization.GatewayCustomerId = null; // No Stripe customer, so no billing update
|
||||
organization.GatewayCustomerId = null; // No Stripe customer, but billing update is still called
|
||||
|
||||
organizationRepository
|
||||
.GetByIdAsync(organizationId)
|
||||
@ -61,8 +61,8 @@ public class OrganizationUpdateCommandTests
|
||||
result,
|
||||
EventType.Organization_Updated);
|
||||
await organizationBillingService
|
||||
.DidNotReceiveWithAnyArgs()
|
||||
.UpdateOrganizationNameAndEmail(Arg.Any<Organization>());
|
||||
.Received(1)
|
||||
.UpdateOrganizationNameAndEmail(result);
|
||||
}
|
||||
|
||||
[Theory, BitAutoData]
|
||||
@ -93,7 +93,7 @@ public class OrganizationUpdateCommandTests
|
||||
[Theory]
|
||||
[BitAutoData("")]
|
||||
[BitAutoData((string)null)]
|
||||
public async Task UpdateAsync_WhenGatewayCustomerIdIsNullOrEmpty_SkipsBillingUpdate(
|
||||
public async Task UpdateAsync_WhenGatewayCustomerIdIsNullOrEmpty_CallsBillingUpdateButHandledGracefully(
|
||||
string gatewayCustomerId,
|
||||
Guid organizationId,
|
||||
Organization organization,
|
||||
@ -133,8 +133,8 @@ public class OrganizationUpdateCommandTests
|
||||
result,
|
||||
EventType.Organization_Updated);
|
||||
await organizationBillingService
|
||||
.DidNotReceiveWithAnyArgs()
|
||||
.UpdateOrganizationNameAndEmail(Arg.Any<Organization>());
|
||||
.Received(1)
|
||||
.UpdateOrganizationNameAndEmail(result);
|
||||
}
|
||||
|
||||
[Theory, BitAutoData]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user