updated tests

This commit is contained in:
jackiettran
2026-01-15 18:47:43 -05:00
parent 35d5050286
commit 63385e049c
13 changed files with 256 additions and 201 deletions

View File

@@ -442,6 +442,10 @@ describe("StripeWebhookService", () => {
expect(mockUser.update).toHaveBeenCalledWith({
stripeConnectedAccountId: null,
stripePayoutsEnabled: false,
stripeDisabledReason: null,
stripeRequirementsCurrentlyDue: [],
stripeRequirementsPastDue: [],
stripeRequirementsLastUpdated: null,
});
});
@@ -525,12 +529,12 @@ describe("StripeWebhookService", () => {
);
});
it("should use name fallback when firstName is not available", async () => {
it("should use lastName fallback when firstName is not available", async () => {
const mockUser = {
id: 1,
email: "owner@test.com",
firstName: null,
name: "Full Name",
lastName: "Smith",
update: jest.fn().mockResolvedValue(true),
};
@@ -545,7 +549,7 @@ describe("StripeWebhookService", () => {
expect(emailServices.payment.sendAccountDisconnectedEmail).toHaveBeenCalledWith(
"owner@test.com",
expect.objectContaining({
ownerName: "Full Name",
ownerName: "Smith",
})
);
});