mirror of
https://github.com/bitwarden/server
synced 2025-12-10 21:33:41 +00:00
Fix failing tests
This commit is contained in:
@@ -30,7 +30,7 @@ public class OrganizationUpdateCommandTests
|
|||||||
var organizationBillingService = sutProvider.GetDependency<IOrganizationBillingService>();
|
var organizationBillingService = sutProvider.GetDependency<IOrganizationBillingService>();
|
||||||
|
|
||||||
organization.Id = organizationId;
|
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
|
organizationRepository
|
||||||
.GetByIdAsync(organizationId)
|
.GetByIdAsync(organizationId)
|
||||||
@@ -61,8 +61,8 @@ public class OrganizationUpdateCommandTests
|
|||||||
result,
|
result,
|
||||||
EventType.Organization_Updated);
|
EventType.Organization_Updated);
|
||||||
await organizationBillingService
|
await organizationBillingService
|
||||||
.DidNotReceiveWithAnyArgs()
|
.Received(1)
|
||||||
.UpdateOrganizationNameAndEmail(Arg.Any<Organization>());
|
.UpdateOrganizationNameAndEmail(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory, BitAutoData]
|
[Theory, BitAutoData]
|
||||||
@@ -93,7 +93,7 @@ public class OrganizationUpdateCommandTests
|
|||||||
[Theory]
|
[Theory]
|
||||||
[BitAutoData("")]
|
[BitAutoData("")]
|
||||||
[BitAutoData((string)null)]
|
[BitAutoData((string)null)]
|
||||||
public async Task UpdateAsync_WhenGatewayCustomerIdIsNullOrEmpty_SkipsBillingUpdate(
|
public async Task UpdateAsync_WhenGatewayCustomerIdIsNullOrEmpty_CallsBillingUpdateButHandledGracefully(
|
||||||
string gatewayCustomerId,
|
string gatewayCustomerId,
|
||||||
Guid organizationId,
|
Guid organizationId,
|
||||||
Organization organization,
|
Organization organization,
|
||||||
@@ -133,8 +133,8 @@ public class OrganizationUpdateCommandTests
|
|||||||
result,
|
result,
|
||||||
EventType.Organization_Updated);
|
EventType.Organization_Updated);
|
||||||
await organizationBillingService
|
await organizationBillingService
|
||||||
.DidNotReceiveWithAnyArgs()
|
.Received(1)
|
||||||
.UpdateOrganizationNameAndEmail(Arg.Any<Organization>());
|
.UpdateOrganizationNameAndEmail(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory, BitAutoData]
|
[Theory, BitAutoData]
|
||||||
|
|||||||
Reference in New Issue
Block a user