Recurring event fixes (#3030)
* Incorporates recurringEvent into calEvent * Recurrent event fixes * Update event.ts * type fixes * Update zod-utils.ts * Adding more recurringEvent to calEvent and other fixes * Moving away from heavy 3rd party enum * Fixing test * Renaming as suggested and fixes Co-authored-by: Leo Giovanetti <[email protected]>
This commit is contained in:
1 parent
8cd420173c
commit
b11398f551
55 files changed
+315
-333
No files matched your search
@@ -1,28 +1,46 @@
|
||||
import { UserPlan } from "@prisma/client";
|
||||
|
||||
import { getLuckyUsers } from "../../pages/api/book/event";
|
||||
|
||||
const baseUser = {
|
||||
id: 0,
|
||||
username: "test",
|
||||
name: "Test User",
|
||||
credentials: [],
|
||||
timeZone: "GMT",
|
||||
bufferTime: 0,
|
||||
email: "[email protected]",
|
||||
destinationCalendar: null,
|
||||
locale: "en",
|
||||
theme: null,
|
||||
brandColor: "#292929",
|
||||
darkBrandColor: "#fafafa",
|
||||
availability: [],
|
||||
selectedCalendars: [],
|
||||
startTime: 0,
|
||||
endTime: 0,
|
||||
schedules: [],
|
||||
defaultScheduleId: null,
|
||||
plan: UserPlan.PRO,
|
||||
avatar: "",
|
||||
hideBranding: true,
|
||||
};
|
||||
|
||||
it("can find lucky users", async () => {
|
||||
const users = [
|
||||
{
|
||||
...baseUser,
|
||||
id: 1,
|
||||
username: "test",
|
||||
name: "Test User",
|
||||
credentials: [],
|
||||
timeZone: "GMT",
|
||||
bufferTime: 0,
|
||||
email: "[email protected]",
|
||||
destinationCalendar: null,
|
||||
locale: "en",
|
||||
},
|
||||
{
|
||||
...baseUser,
|
||||
id: 2,
|
||||
username: "test2",
|
||||
name: "Test 2 User",
|
||||
credentials: [],
|
||||
timeZone: "GMT",
|
||||
bufferTime: 0,
|
||||
email: "[email protected]",
|
||||
destinationCalendar: null,
|
||||
locale: "en",
|
||||
},
|
||||
];
|
||||
expect(
|
||||
|
||||
Reference in new issue
Block a user