@@ -43,8 +43,8 @@ describe('CronJobService', () => {
4343 {
4444 provide : EscrowCompletionService ,
4545 useValue : {
46- processPendingEscrowCompletion : jest . fn ( ) ,
47- processPaidEscrowCompletion : jest . fn ( ) ,
46+ processPendingRecords : jest . fn ( ) ,
47+ processPaidEscrows : jest . fn ( ) ,
4848 processAwaitingPayouts : jest . fn ( ) ,
4949 } ,
5050 } ,
@@ -258,9 +258,7 @@ describe('CronJobService', () => {
258258
259259 await service . processPendingEscrowCompletion ( ) ;
260260
261- expect (
262- escrowCompletionService . processPendingEscrowCompletion ,
263- ) . not . toHaveBeenCalled ( ) ;
261+ expect ( escrowCompletionService . processPaidEscrows ) . not . toHaveBeenCalled ( ) ;
264262 } ) ;
265263
266264 it ( 'should process pending escrow completion and complete the cron job' , async ( ) => {
@@ -274,9 +272,7 @@ describe('CronJobService', () => {
274272
275273 await service . processPendingEscrowCompletion ( ) ;
276274
277- expect (
278- escrowCompletionService . processPendingEscrowCompletion ,
279- ) . toHaveBeenCalled ( ) ;
275+ expect ( escrowCompletionService . processPendingRecords ) . toHaveBeenCalled ( ) ;
280276 expect ( service . startCronJob ) . toHaveBeenCalled ( ) ;
281277 expect ( service . completeCronJob ) . toHaveBeenCalled ( ) ;
282278 } ) ;
@@ -290,7 +286,7 @@ describe('CronJobService', () => {
290286 . spyOn ( service , 'completeCronJob' )
291287 . mockResolvedValue ( new CronJobEntity ( ) ) ;
292288
293- escrowCompletionService . processPendingEscrowCompletion . mockRejectedValue (
289+ escrowCompletionService . processPendingRecords . mockRejectedValue (
294290 new Error ( 'Processing error' ) ,
295291 ) ;
296292
@@ -352,9 +348,7 @@ describe('CronJobService', () => {
352348
353349 await service . processPaidEscrowCompletion ( ) ;
354350
355- expect (
356- escrowCompletionService . processPaidEscrowCompletion ,
357- ) . not . toHaveBeenCalled ( ) ;
351+ expect ( escrowCompletionService . processPaidEscrows ) . not . toHaveBeenCalled ( ) ;
358352 } ) ;
359353
360354 it ( 'should process paid escrow completion and complete the cron job' , async ( ) => {
@@ -368,9 +362,7 @@ describe('CronJobService', () => {
368362
369363 await service . processPaidEscrowCompletion ( ) ;
370364
371- expect (
372- escrowCompletionService . processPaidEscrowCompletion ,
373- ) . toHaveBeenCalled ( ) ;
365+ expect ( escrowCompletionService . processPaidEscrows ) . toHaveBeenCalled ( ) ;
374366 expect ( service . startCronJob ) . toHaveBeenCalled ( ) ;
375367 expect ( service . completeCronJob ) . toHaveBeenCalled ( ) ;
376368 } ) ;
@@ -384,7 +376,7 @@ describe('CronJobService', () => {
384376 . spyOn ( service , 'completeCronJob' )
385377 . mockResolvedValue ( new CronJobEntity ( ) ) ;
386378
387- escrowCompletionService . processPaidEscrowCompletion . mockRejectedValue (
379+ escrowCompletionService . processPaidEscrows . mockRejectedValue (
388380 new Error ( 'Processing error' ) ,
389381 ) ;
390382
0 commit comments