Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
Udit-takkar committed Aug 27, 2024
1 parent 5fe99ba commit fad74b8
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ describe("confirmHandler", () => {
const attendeeUser = getOrganizer({
email: "test@example.com",
name: "test name",
id: 102,
schedules: [TestData.schedules.IstWorkHours],
});

const organizer = getOrganizer({
Expand All @@ -35,8 +37,8 @@ describe("confirmHandler", () => {
schedules: [TestData.schedules.IstWorkHours],
});

const uidOfBookingToBeRescheduled = "n5Wv3eHgconAED2j4gcVhP";
const iCalUID = `${uidOfBookingToBeRescheduled}@Cal.com`;
const uidOfBooking = "n5Wv3eHgconAED2j4gcVhP";
const iCalUID = `${uidOfBooking}@Cal.com`;

const { dateString: plus1DateString } = getDate({ dateIncrement: 1 });

Expand All @@ -57,7 +59,7 @@ describe("confirmHandler", () => {
id: 1,
slotInterval: 15,
length: 15,
location: null,
locations: [],
users: [
{
id: 101,
Expand All @@ -68,7 +70,7 @@ describe("confirmHandler", () => {
bookings: [
{
id: 101,
uid: uidOfBookingToBeRescheduled,
uid: uidOfBooking,
eventTypeId: 1,
status: BookingStatus.PENDING,
startTime: `${plus1DateString}T05:00:00.000Z`,
Expand All @@ -93,7 +95,8 @@ describe("confirmHandler", () => {
user: {
id: organizer.id,
name: organizer.name,
...organizer,
timeZone: organizer.timeZone,
username: organizer.username,
} as NonNullable<TrpcSessionUser>,
};

Expand All @@ -102,6 +105,6 @@ describe("confirmHandler", () => {
input: { bookingId: 101, confirmed: true, reason: "" },
});

expect(res.status).toBe(BookingStatus.ACCEPTED);
expect(res?.status).toBe(BookingStatus.ACCEPTED);
});
});

0 comments on commit fad74b8

Please sign in to comment.