@@ -1462,11 +1462,11 @@ describe('actions/IOU/ReportWorkflow', () => {
14621462
14631463 await waitForBatchedUpdates ( ) ;
14641464
1465- expect ( canApproveIOU ( fakeReport , fakePolicy , { } ) ) . toBeFalsy ( ) ;
1465+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID ) ) . toBeFalsy ( ) ;
14661466 // Then should return false when passing transactions directly as the fourth parameter instead of relying on Onyx data
14671467 const { result} = renderHook ( ( ) => useReportWithTransactionsAndViolations ( reportID ) , { wrapper : OnyxListItemProvider } ) ;
14681468 await waitForBatchedUpdatesWithAct ( ) ;
1469- expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
1469+ expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , RORY_ACCOUNT_ID , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
14701470 } ) ;
14711471 it ( 'should return false if we have only scanning transactions' , async ( ) => {
14721472 const policyID = '2' ;
@@ -1518,11 +1518,11 @@ describe('actions/IOU/ReportWorkflow', () => {
15181518
15191519 await waitForBatchedUpdates ( ) ;
15201520
1521- expect ( canApproveIOU ( fakeReport , fakePolicy , { } ) ) . toBeFalsy ( ) ;
1521+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID ) ) . toBeFalsy ( ) ;
15221522 // Then should return false when passing transactions directly as the fourth parameter instead of relying on Onyx data
15231523 const { result} = renderHook ( ( ) => useReportWithTransactionsAndViolations ( reportID ) , { wrapper : OnyxListItemProvider } ) ;
15241524 await waitForBatchedUpdatesWithAct ( ) ;
1525- expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
1525+ expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , RORY_ACCOUNT_ID , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
15261526 } ) ;
15271527 it ( 'should return false if all transactions are pending card or scanning transaction' , async ( ) => {
15281528 const policyID = '2' ;
@@ -1565,11 +1565,11 @@ describe('actions/IOU/ReportWorkflow', () => {
15651565
15661566 await waitForBatchedUpdates ( ) ;
15671567
1568- expect ( canApproveIOU ( fakeReport , fakePolicy , { } ) ) . toBeFalsy ( ) ;
1568+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID ) ) . toBeFalsy ( ) ;
15691569 // Then should return false when passing transactions directly as the fourth parameter instead of relying on Onyx data
15701570 const { result} = renderHook ( ( ) => useReportWithTransactionsAndViolations ( reportID ) , { wrapper : OnyxListItemProvider } ) ;
15711571 await waitForBatchedUpdatesWithAct ( ) ;
1572- expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
1572+ expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , RORY_ACCOUNT_ID , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeFalsy ( ) ;
15731573 } ) ;
15741574 it ( 'should return true if at least one transaction is not pending card or scanning transaction' , async ( ) => {
15751575 const policyID = '2' ;
@@ -1618,11 +1618,11 @@ describe('actions/IOU/ReportWorkflow', () => {
16181618
16191619 await waitForBatchedUpdates ( ) ;
16201620
1621- expect ( canApproveIOU ( fakeReport , fakePolicy , { } ) ) . toBeTruthy ( ) ;
1621+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID ) ) . toBeTruthy ( ) ;
16221622 // Then should return true when passing transactions directly as the fourth parameter instead of relying on Onyx data
16231623 const { result} = renderHook ( ( ) => useReportWithTransactionsAndViolations ( reportID ) , { wrapper : OnyxListItemProvider } ) ;
16241624 await waitForBatchedUpdatesWithAct ( ) ;
1625- expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeTruthy ( ) ;
1625+ expect ( canApproveIOU ( result . current . at ( 0 ) as Report , fakePolicy , { } , RORY_ACCOUNT_ID , result . current . at ( 1 ) as Transaction [ ] ) ) . toBeTruthy ( ) ;
16261626 } ) ;
16271627
16281628 it ( 'should return false if the report is closed' , async ( ) => {
@@ -1651,9 +1651,9 @@ describe('actions/IOU/ReportWorkflow', () => {
16511651 } ) ;
16521652 await waitForBatchedUpdates ( ) ;
16531653 // Then, canApproveIOU should return false since the report is closed
1654- expect ( canApproveIOU ( fakeReport , fakePolicy , { } ) ) . toBeFalsy ( ) ;
1654+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID ) ) . toBeFalsy ( ) ;
16551655 // Then should return false when passing transactions directly as the fourth parameter instead of relying on Onyx data
1656- expect ( canApproveIOU ( fakeReport , fakePolicy , { } , [ fakeTransaction ] ) ) . toBeFalsy ( ) ;
1656+ expect ( canApproveIOU ( fakeReport , fakePolicy , { } , RORY_ACCOUNT_ID , [ fakeTransaction ] ) ) . toBeFalsy ( ) ;
16571657 } ) ;
16581658 } ) ;
16591659
0 commit comments