@@ -418,19 +418,6 @@ describe('DetailsFieldsComponent', () => {
418418 expect ( component . saveEntry . emit ) . toHaveBeenCalledWith ( data ) ;
419419 } ) ;
420420
421- it ( 'should not modify the start_date when start_hour has not been modified' , ( ) => {
422- const currentDate = moment ( ) . format ( 'YYYY-MM-DD' ) ;
423- const startHour = moment ( ) . subtract ( 3 , 'hours' ) . format ( 'HH:mm:ss' ) ;
424- const expectedStartDate = new Date ( `${ currentDate } T${ startHour . trim ( ) } ` ) ;
425-
426- component . entryToEdit = { ...entryToEdit , start_date : expectedStartDate } ;
427- fixture . componentInstance . ngOnChanges ( ) ;
428-
429- component . entryForm . patchValue ( { description : 'test' } ) ;
430-
431- expect ( component . dateToSubmit ( 'start_date' , 'start_hour' ) ) . toEqual ( expectedStartDate ) ;
432- } ) ;
433-
434421 it ( 'should modify the start_date when start_hour has been modified' , ( ) => {
435422 const startDate = new Date ( mockCurrentDate ) ;
436423
@@ -445,19 +432,6 @@ describe('DetailsFieldsComponent', () => {
445432 expect ( component . dateToSubmit ( 'start_date' , 'start_hour' ) ) . toEqual ( expectedStartDate ) ;
446433 } ) ;
447434
448- it ( 'should not modify the end_date when end_hour has not been modified' , ( ) => {
449- const currentDate = moment ( ) . format ( 'YYYY-MM-DD' ) ;
450- const endHour = moment ( ) . subtract ( 3 , 'hours' ) . format ( 'HH:mm:ss' ) ;
451- const expectedEndDate = new Date ( `${ currentDate } T${ endHour . trim ( ) } ` ) ;
452-
453- component . entryToEdit = { ...entryToEdit , end_date : expectedEndDate } ;
454- fixture . componentInstance . ngOnChanges ( ) ;
455-
456- component . entryForm . patchValue ( { description : 'test' } ) ;
457-
458- expect ( component . dateToSubmit ( 'end_date' , 'end_hour' ) ) . toEqual ( expectedEndDate ) ;
459- } ) ;
460-
461435 it ( 'should modify the end_date when end_hour has been modified' , ( ) => {
462436 const endDate = new Date ( mockCurrentDate ) ;
463437
0 commit comments