updated tests
This commit is contained in:
@@ -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",
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user