()
| 236 | } |
| 237 | |
| 238 | function createMockRequest(): NextRequest { |
| 239 | const mockHeaders = new Map([ |
| 240 | ['authorization', 'Bearer test-cron-secret'], |
| 241 | ['content-type', 'application/json'], |
| 242 | ]) |
| 243 | |
| 244 | return { |
| 245 | headers: { |
| 246 | get: (key: string) => mockHeaders.get(key.toLowerCase()) || null, |
| 247 | }, |
| 248 | url: 'http://localhost:3000/api/schedules/execute', |
| 249 | } as NextRequest |
| 250 | } |
| 251 | |
| 252 | describe('Scheduled Workflow Execution API Route', () => { |
| 253 | beforeEach(() => { |