@@ -213,7 +213,6 @@ describe('DetailsFieldsComponent', () => {
213213
214214 it ( 'should emit saveEntry event' , ( ) => {
215215 spyOn ( component . saveEntry , 'emit' ) ;
216- component . entryToEdit = { ...entryToEdit } ;
217216 component . entryForm . setValue ( {
218217 project_id : 'p1' ,
219218 project_name : 'p-name' ,
@@ -311,7 +310,6 @@ describe('DetailsFieldsComponent', () => {
311310 component . goingToWorkOnThis = true ;
312311 spyOn ( component . saveEntry , 'emit' ) ;
313312
314- component . entryToEdit = { ...entryToEdit } ;
315313 component . entryForm . setValue ( { ...formValues , start_date : '2020-06-11' , end_date : '2020-06-11' } ) ;
316314
317315 component . onSubmit ( ) ;
@@ -392,7 +390,6 @@ describe('DetailsFieldsComponent', () => {
392390 it ( 'displays error message when the date selected is in the future' , ( ) => {
393391 spyOn ( toastrServiceStub , 'error' ) ;
394392
395- component . entryToEdit = { ...entryToEdit } ;
396393 const futureDate = moment ( ) . add ( 1 , 'days' ) . format ( DATE_FORMAT_YEAR ) ;
397394 component . entryForm . setValue ( { ...formValues , start_date : futureDate , end_date : futureDate } ) ;
398395 component . onSubmit ( ) ;
@@ -403,7 +400,6 @@ describe('DetailsFieldsComponent', () => {
403400 it ( 'when start_date is in the future and end_date is OK then throws an error' , ( ) => {
404401 spyOn ( toastrServiceStub , 'error' ) ;
405402
406- component . entryToEdit = { ...entryToEdit } ;
407403 const futureDate = moment ( ) . add ( 1 , 'days' ) . format ( DATE_FORMAT_YEAR ) ;
408404 const currentDate = moment ( ) . format ( DATE_FORMAT_YEAR ) ;
409405 component . entryForm . setValue ( { ...formValues , start_date : futureDate , end_date : currentDate } ) ;
@@ -415,7 +411,6 @@ describe('DetailsFieldsComponent', () => {
415411 it ( 'when start_date is OK and end_date is in the future then throws an error future' , ( ) => {
416412 spyOn ( toastrServiceStub , 'error' ) ;
417413
418- component . entryToEdit = { ...entryToEdit } ;
419414 const futureDate = moment ( ) . add ( 1 , 'days' ) . format ( DATE_FORMAT_YEAR ) ;
420415 const currentDate = moment ( ) . format ( DATE_FORMAT_YEAR ) ;
421416 component . entryForm . setValue ( { ...formValues , start_date : currentDate , end_date : futureDate } ) ;
0 commit comments