From 56a21a0469d4fb7eaefdb2bf38bbb7e21a70e150 Mon Sep 17 00:00:00 2001 From: Karl Ludwig Weise Date: Fri, 17 Apr 2026 16:58:08 +0200 Subject: [PATCH] Fix tests --- .../__tests__/create-new-client-api.test.ts | 1 + .../staff-create/__tests__/staff-create.test.ts | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/routes/api/tenants/[id]/appointments/create-new-client/__tests__/create-new-client-api.test.ts b/src/routes/api/tenants/[id]/appointments/create-new-client/__tests__/create-new-client-api.test.ts index c2be121..2376c4f 100644 --- a/src/routes/api/tenants/[id]/appointments/create-new-client/__tests__/create-new-client-api.test.ts +++ b/src/routes/api/tenants/[id]/appointments/create-new-client/__tests__/create-new-client-api.test.ts @@ -36,6 +36,7 @@ describe("Create New Client API Route", () => { channelId: mockChannelId, agentId: "agent-123", // Missing field added appointmentDate: "2024-12-25T14:30:00.000Z", + appointmentTimeZone: "Europe/Berlin", duration: 10, emailHash: "test-email-hash", clientEmail: "test@example.com", diff --git a/src/routes/api/tenants/[id]/appointments/staff-create/__tests__/staff-create.test.ts b/src/routes/api/tenants/[id]/appointments/staff-create/__tests__/staff-create.test.ts index 4dd43b6..12b8633 100644 --- a/src/routes/api/tenants/[id]/appointments/staff-create/__tests__/staff-create.test.ts +++ b/src/routes/api/tenants/[id]/appointments/staff-create/__tests__/staff-create.test.ts @@ -68,6 +68,7 @@ describe("POST /api/tenants/[id]/appointments/staff-create", () => { clientEmail: "test@example.com", emailHash, appointmentDate: "2026-01-15T14:00:00.000Z", + appointmentTimeZone: "Europe/Berlin", duration: 30, channelId: "channel-123", agentId: "agent-123", @@ -108,6 +109,7 @@ describe("POST /api/tenants/[id]/appointments/staff-create", () => { channelId: "channel-123", agentId: "agent-123", appointmentDate: "2026-01-15T14:00:00.000Z", + appointmentTimeZone: "Europe/Berlin", duration: 30, emailHash, clientEmail: "test@example.com", @@ -151,6 +153,7 @@ describe("POST /api/tenants/[id]/appointments/staff-create", () => { hasNoEmail: true, emailHash: "unique-hash-for-no-email", appointmentDate: "2026-01-15T14:00:00.000Z", + appointmentTimeZone: "Europe/Berlin", duration: 30, channelId: "channel-123", agentId: "agent-123", @@ -214,6 +217,7 @@ describe("POST /api/tenants/[id]/appointments/staff-create", () => { clientEmail: "existing@example.com", emailHash, appointmentDate: "2026-01-15T14:00:00.000Z", + appointmentTimeZone: "Europe/Berlin", duration: 30, channelId: "channel-123", agentId: "agent-123", @@ -245,6 +249,7 @@ describe("POST /api/tenants/[id]/appointments/staff-create", () => { channelId: "channel-123", agentId: "agent-123", appointmentDate: "2026-01-15T14:00:00.000Z", + appointmentTimeZone: "Europe/Berlin", duration: 30, clientEmail: "existing@example.com", clientLanguage: "de", @@ -291,6 +296,7 @@ describe("POST /api/tenants/[id]/appointments/staff-create", () => { clientEmail: "test@example.com", emailHash, appointmentDate: "2026-01-15T14:00:00.000Z", + appointmentTimeZone: "Europe/Berlin", duration: 30, channelId: "channel-123", agentId: "agent-123", @@ -387,6 +393,7 @@ describe("POST /api/tenants/[id]/appointments/staff-create", () => { body: JSON.stringify({ emailHash, appointmentDate: "2026-01-15T14:00:00.000Z", + appointmentTimeZone: "Europe/Berlin", duration: 30, channelId: "channel-123", agentId: "agent-123",