@@ -1100,7 +1100,7 @@ describe("handleNewBooking", () => {
1100
1100
) ;
1101
1101
1102
1102
test (
1103
- `Booking should still be created if booking with Zoom errors ` ,
1103
+ `Booking should still be created using calvideo, if error occurs with zoom ` ,
1104
1104
async ( { emails } ) => {
1105
1105
const handleNewBooking = ( await import ( "@calcom/features/bookings/lib/handleNewBooking" ) ) . default ;
1106
1106
const subscriberUrl = "http://my-webhook.example.com" ;
@@ -1132,7 +1132,7 @@ describe("handleNewBooking", () => {
1132
1132
] ,
1133
1133
} ,
1134
1134
] ,
1135
- apps : [ TestData . apps [ "zoomvideo" ] ] ,
1135
+ apps : [ TestData . apps [ "zoomvideo" ] , TestData . apps [ "daily-video" ] ] ,
1136
1136
webhooks : [
1137
1137
{
1138
1138
userId : organizer . id ,
@@ -1150,6 +1150,15 @@ describe("handleNewBooking", () => {
1150
1150
metadataLookupKey : "zoomvideo" ,
1151
1151
} ) ;
1152
1152
1153
+ mockSuccessfulVideoMeetingCreation ( {
1154
+ metadataLookupKey : "dailyvideo" ,
1155
+ videoMeetingData : {
1156
+ id : "MOCK_ID" ,
1157
+ password : "MOCK_PASS" ,
1158
+ url : `http://mock-dailyvideo.example.com/meeting-1` ,
1159
+ } ,
1160
+ } ) ;
1161
+
1153
1162
const { req } = createMockNextJsRequest ( {
1154
1163
method : "POST" ,
1155
1164
body : getMockRequestDataForBooking ( {
@@ -1163,16 +1172,18 @@ describe("handleNewBooking", () => {
1163
1172
} ,
1164
1173
} ) ,
1165
1174
} ) ;
1166
- await handleNewBooking ( req ) ;
1175
+ const createdBooking = await handleNewBooking ( req ) ;
1167
1176
1177
+ expect ( createdBooking ) . toContain ( {
1178
+ location : BookingLocations . CalVideo ,
1179
+ } ) ;
1168
1180
expectBrokenIntegrationEmails ( { organizer, emails } ) ;
1169
-
1170
1181
expectBookingCreatedWebhookToHaveBeenFired ( {
1171
1182
booker,
1172
1183
organizer,
1173
- location : BookingLocations . ZoomVideo ,
1184
+ location : BookingLocations . CalVideo ,
1174
1185
subscriberUrl,
1175
- videoCallUrl : null ,
1186
+ videoCallUrl : ` ${ WEBAPP_URL } /video/ ${ createdBooking . uid } ` ,
1176
1187
} ) ;
1177
1188
} ,
1178
1189
timeout
0 commit comments