diff --git a/packages/graphql/api/orders.test.js b/packages/graphql/api/orders.test.js index 384d6c5..caa74d6 100644 --- a/packages/graphql/api/orders.test.js +++ b/packages/graphql/api/orders.test.js @@ -274,6 +274,21 @@ describe('OrdersService', () => { await expect(result).rejects.toThrow(ERRORS.MISSING_START_TIME); }); + it('should throw error when datetime_end is missing', async () => { + const variablesWithoutEnd = { + input: { + client: 'customer-123', + datetime_start: now.toISOString(), + services: ['service-123'], + slot: 'slot-123', + }, + }; + + const result = ordersService.createOrder(variablesWithoutEnd); + + await expect(result).rejects.toThrow(ERRORS.MISSING_END_TIME); + }); + it('should throw error when client is missing', async () => { const variablesWithoutClient = { input: {