@@ -247,7 +247,7 @@ describe('TimeEntriesComponent', () => {
247247 uri : 'abc' ,
248248 } , shouldRestartEntry : true
249249 } ;
250- component . entryId = 'new-entry ' ;
250+ component . entryId = 'entry_1 ' ;
251251 spyOn ( injectedToastrService , 'error' ) ;
252252
253253 component . saveEntry ( newEntry ) ;
@@ -257,6 +257,7 @@ describe('TimeEntriesComponent', () => {
257257
258258 it ( 'displays an error when end date of entry is greater than active entry start date' , async ( ) => {
259259 component . activeTimeEntry = entry ;
260+
260261 const newEntry = {
261262 entry : {
262263 project_id : 'p-id' ,
@@ -267,7 +268,7 @@ describe('TimeEntriesComponent', () => {
267268 uri : 'abc' ,
268269 } , shouldRestartEntry : true
269270 } ;
270- component . entryId = 'new-entry ' ;
271+ component . entryId = 'entry_1 ' ;
271272 spyOn ( injectedToastrService , 'error' ) ;
272273
273274 component . saveEntry ( newEntry ) ;
@@ -349,8 +350,9 @@ describe('TimeEntriesComponent', () => {
349350 expect ( component . doSave ) . toHaveBeenCalledWith ( entryToSave ) ;
350351 } ) ) ;
351352
352- it ( 'when event contains should restart as true, then a restart Entry action should be triggered' , ( ) => {
353+ it ( 'when event contains should update as true, then a restart Entry action should be triggered' , ( ) => {
353354 component . entry = { start_date : new Date ( ) , id : '1234' , technologies : [ ] , project_name : 'time-tracker' } ;
355+
354356 const entryToSave = {
355357 entry : {
356358 id : '123' ,
@@ -363,12 +365,13 @@ describe('TimeEntriesComponent', () => {
363365
364366 } , shouldRestartEntry : false
365367 } ;
368+
366369 component . entryId = '123' ;
367370 spyOn ( store , 'dispatch' ) ;
368371
369372 component . doSave ( entryToSave ) ;
370373
371- expect ( store . dispatch ) . toHaveBeenCalledWith ( new entryActions . RestartEntry ( entryToSave . entry ) ) ;
374+ expect ( store . dispatch ) . toHaveBeenCalledWith ( new entryActions . UpdateEntry ( entryToSave . entry ) ) ;
372375 } ) ;
373376
374377 it ( 'should preload data of last entry when a project is selected while creating new entry ' , waitForAsync ( ( ) => {
0 commit comments