Skip to content

Commit

Permalink
Type and test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joeauyeung committed Dec 20, 2024
1 parent ea99744 commit fcbacdc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions apps/web/lib/__tests__/getTeamMemberEmailFromCrm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ describe("getTeamMemberEmailForResponseOrContactUsingUrlQuery", () => {
schedulingType: SchedulingType.ROUND_ROBIN,
metadata: null,
length: 30,
hosts: [
{
user: {
email: "owner@example.com",
},
},
],
};

it("should return null when email is not provided in query", async () => {
Expand Down Expand Up @@ -235,7 +242,7 @@ describe("getTeamMemberEmailForResponseOrContactUsingUrlQuery", () => {
});

it("should return null when CRM owner is not part of event type", async () => {
const ownerEmail = "owner@example.com";
const ownerEmail = "ownerNotInEventType@example.com";
const bookerEmail = "booker@example.com";
mockGetCRMContactOwnerForRRLeadSkip({ bookerEmail, teamMemberEmail: ownerEmail });

Expand Down Expand Up @@ -331,7 +338,7 @@ describe("getTeamMemberEmailForResponseOrContactUsingUrlQuery", () => {

it("should return null when when cal.routingFormResponseId and cal.salesforce.xxxx=true is provided but the returned email isn't an event member", async () => {
const bookerEmail = "booker@example.com";
const teamMemberEmail = "owner@example.com";
const teamMemberEmail = "ownerNotInEventType@example.com";
mockBookingFormHandler({ bookerEmail, teamMemberEmail });
const SOME_OTHER_EVENT_ID = 200;
await createHostForEvent({
Expand Down

0 comments on commit fcbacdc

Please sign in to comment.