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 tests

Kiran K596bb427e996
diff --git a/apps/web/tests/tracks/create-customer.test.ts b/apps/web/tests/tracks/create-customer.test.ts
index 3598b5b963..c3fc23086a 100644
--- a/apps/web/tests/tracks/create-customer.test.ts
+++ b/apps/web/tests/tracks/create-customer.test.ts
@@ -1,21 +1,19 @@
import { trackCustomerResponsetSchema } from "@/lib/zod/schemas/customers";
+import { nanoid } from "@dub/utils";
import { Tag } from "@prisma/client";
import { describe, expect, test } from "vitest";
import { IntegrationHarness } from "../utils/integration";
-const customer = {
- customerId: "david",
- customerName: "David",
- customerEmail: "[email protected]",
- customerAvatar: "https://example.com/david.jpeg",
-};
-
describe.skip("POST /track/customer", async () => {
const h = new IntegrationHarness();
const { workspace, http } = await h.init();
const { workspaceId } = workspace;
test("with required params", async () => {
+ const customer = {
+ customerId: nanoid(16),
+ };
+
const response = await http.post<Tag>({
path: "/track/customer",
query: { workspaceId },
@@ -37,6 +35,13 @@ describe.skip("POST /track/customer", async () => {
});
test("with all params", async () => {
+ const customer = {
+ customerId: nanoid(16),
+ customerName: "David",
+ customerEmail: "[email protected]",
+ customerAvatar: "https://example.com/david.jpeg",
+ };
+
const response = await http.post<Tag>({
path: "/track/customer",
query: { workspaceId },