Fix tests

This commit is contained in:
Karl Ludwig Weise
2026-04-17 16:58:08 +02:00
parent 701492e637
commit 56a21a0469
2 changed files with 8 additions and 0 deletions
@@ -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",
@@ -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",