@@ -1456,11 +1456,11 @@ describe('actions/IOU/ReportWorkflow', () => {
14561456
14571457 await waitForBatchedUpdates ( ) ;
14581458
1459- expect ( canApproveIOU ( fakeReport , fakePolicy , { } ) ) . toBeFalsy ( ) ;
1459+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID ) ) . toBeFalsy ( ) ;
14601460 // Then should return false when passing transactions directly as the fourth parameter instead of relying on Onyx data
14611461 const { result} = renderHook ( ( ) => useReportWithTransactionsAndViolations ( reportID ) , { wrapper : OnyxListItemProvider } ) ;
14621462 await waitForBatchedUpdatesWithAct ( ) ;
1463- expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
1463+ expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , RORY_ACCOUNT_ID , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
14641464 } ) ;
14651465 it ( 'should return false if we have only scanning transactions' , async ( ) => {
14661466 const policyID = '2' ;
@@ -1512,11 +1512,11 @@ describe('actions/IOU/ReportWorkflow', () => {
15121512
15131513 await waitForBatchedUpdates ( ) ;
15141514
1515- expect ( canApproveIOU ( fakeReport , fakePolicy , { } ) ) . toBeFalsy ( ) ;
1515+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID ) ) . toBeFalsy ( ) ;
15161516 // Then should return false when passing transactions directly as the fourth parameter instead of relying on Onyx data
15171517 const { result} = renderHook ( ( ) => useReportWithTransactionsAndViolations ( reportID ) , { wrapper : OnyxListItemProvider } ) ;
15181518 await waitForBatchedUpdatesWithAct ( ) ;
1519- expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
1519+ expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , RORY_ACCOUNT_ID , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
15201520 } ) ;
15211521 it ( 'should return false if all transactions are pending card or scanning transaction' , async ( ) => {
15221522 const policyID = '2' ;
@@ -1559,11 +1559,11 @@ describe('actions/IOU/ReportWorkflow', () => {
15591559
15601560 await waitForBatchedUpdates ( ) ;
15611561
1562- expect ( canApproveIOU ( fakeReport , fakePolicy , { } ) ) . toBeFalsy ( ) ;
1562+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID ) ) . toBeFalsy ( ) ;
15631563 // Then should return false when passing transactions directly as the fourth parameter instead of relying on Onyx data
15641564 const { result} = renderHook ( ( ) => useReportWithTransactionsAndViolations ( reportID ) , { wrapper : OnyxListItemProvider } ) ;
15651565 await waitForBatchedUpdatesWithAct ( ) ;
1566- expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
1566+ expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , RORY_ACCOUNT_ID , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
15671567 } ) ;
15681568 it ( 'should return true if at least one transaction is not pending card or scanning transaction' , async ( ) => {
15691569 const policyID = '2' ;
@@ -1612,11 +1612,11 @@ describe('actions/IOU/ReportWorkflow', () => {
16121612
16131613 await waitForBatchedUpdates ( ) ;
16141614
1615- expect ( canApproveIOU ( fakeReport , fakePolicy , { } ) ) . toBeTruthy ( ) ;
1615+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID ) ) . toBeTruthy ( ) ;
16161616 // Then should return true when passing transactions directly as the fourth parameter instead of relying on Onyx data
16171617 const { result} = renderHook ( ( ) => useReportWithTransactionsAndViolations ( reportID ) , { wrapper : OnyxListItemProvider } ) ;
16181618 await waitForBatchedUpdatesWithAct ( ) ;
1619- expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeTruthy ( ) ;
1619+ expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , RORY_ACCOUNT_ID , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeTruthy ( ) ;
16201620 } ) ;
16211621
16221622 it ( 'should return false if the report is closed' , async ( ) => {
@@ -1645,9 +1645,9 @@ describe('actions/IOU/ReportWorkflow', () => {
16451645 } ) ;
16461646 await waitForBatchedUpdates ( ) ;
16471647 // Then, canApproveIOU should return false since the report is closed
1648- expect ( canApproveIOU ( fakeReport , fakePolicy , { } ) ) . toBeFalsy ( ) ;
1648+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID ) ) . toBeFalsy ( ) ;
16491649 // Then should return false when passing transactions directly as the fourth parameter instead of relying on Onyx data
1650- expect ( canApproveIOU ( fakeReport , fakePolicy , { } , [ fakeTransaction ] ) ) . toBeFalsy ( ) ;
1650+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID , [ fakeTransaction ] ) ) . toBeFalsy ( ) ;
16511651 } ) ;
16521652 } ) ;
16531653
0 commit comments