Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update track-lead.test.ts

Steven Tey649d7eeab41c
diff --git a/apps/web/tests/tracks/track-lead.test.ts b/apps/web/tests/tracks/track-lead.test.ts
index d135a009cc..5448c1cf13 100644
--- a/apps/web/tests/tracks/track-lead.test.ts
+++ b/apps/web/tests/tracks/track-lead.test.ts
@@ -50,17 +50,14 @@ describe("POST /track/lead", async () => {
clickId: E2E_CLICK_ID,
eventName: "Signup",
externalId: customer1.externalId,
+ customerName: customer1.name,
+ customerEmail: customer1.email,
+ customerAvatar: customer1.avatar,
},
});
- expect(response.status).toEqual(409);
- expect(response.data).toStrictEqual({
- error: {
- code: "conflict",
- doc_url: "https://dub.co/docs/api-reference/errors#conflict",
- message: `Customer with externalId ${customer1.externalId} and event name Signup has already been recorded.`,
- },
- });
+ // should return the same response since it's idempotent
+ expectValidLeadResponse(response, customer1);
});
test("track a lead with eventQuantity", async () => {