@@ -51,6 +51,7 @@ describe("POST /api/events", () => {
5151 ) ;
5252
5353 expect ( createEvent ) . toHaveBeenCalledWith ( {
54+ eventType : "time_grid" ,
5455 title : "Sprint Planning" ,
5556 timezone : "Europe/Vienna" ,
5657 dates : [ "2026-03-30" ] ,
@@ -63,6 +64,41 @@ describe("POST /api/events", () => {
6364 expect ( response . status ) . toBe ( 201 ) ;
6465 } ) ;
6566
67+ it ( "passes full-day event creation through to the service" , async ( ) => {
68+ const { POST } = await import ( "./route" ) ;
69+ const response = await POST (
70+ new Request ( "https://tempoll.example.com/api/events" , {
71+ method : "POST" ,
72+ body : JSON . stringify ( {
73+ eventType : "full_day" ,
74+ title : "Offsite Days" ,
75+ timezone : "Europe/Vienna" ,
76+ dates : [ "2026-03-30" , "2026-03-31" ] ,
77+ dayStartMinutes : 540 ,
78+ dayEndMinutes : 600 ,
79+ slotMinutes : 30 ,
80+ meetingDurationMinutes : 60 ,
81+ } ) ,
82+ headers : {
83+ "Accept-Language" : "en-US" ,
84+ "Content-Type" : "application/json" ,
85+ } ,
86+ } ) ,
87+ ) ;
88+
89+ expect ( createEvent ) . toHaveBeenCalledWith ( {
90+ eventType : "full_day" ,
91+ title : "Offsite Days" ,
92+ timezone : "Europe/Vienna" ,
93+ dates : [ "2026-03-30" , "2026-03-31" ] ,
94+ dayStartMinutes : 540 ,
95+ dayEndMinutes : 600 ,
96+ slotMinutes : 30 ,
97+ meetingDurationMinutes : 60 ,
98+ } ) ;
99+ expect ( response . status ) . toBe ( 201 ) ;
100+ } ) ;
101+
66102 it ( "returns a 429 with Retry-After when the create-event limit is exceeded" , async ( ) => {
67103 enforceRateLimit . mockImplementation ( ( ) => {
68104 throw tooManyRequests ( "event_create_rate_limited" , 900 ) ;
0 commit comments