Skip to content

Commit 14116f3

Browse files
committed
update test case
1 parent d3de207 commit 14116f3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/unit/ReportSecondaryActionUtilsTest.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,6 +1312,7 @@ describe('getSecondaryTransactionThreadActions', () => {
13121312

13131313
it('includes REMOVE HOLD option for transaction thread report admin if he is not the holder', () => {
13141314
const report = {} as unknown as Report;
1315+
const transactionThreadReport = {} as unknown as Report;
13151316
const policy = {
13161317
role: CONST.POLICY.ROLE.ADMIN,
13171318
} as unknown as Policy;
@@ -1322,12 +1323,12 @@ describe('getSecondaryTransactionThreadActions', () => {
13221323
} as unknown as Transaction;
13231324

13241325
jest.spyOn(ReportUtils, 'isHoldCreator').mockReturnValue(false);
1325-
const result = getSecondaryTransactionThreadActions(report, transaction, [], policy);
1326+
const result = getSecondaryTransactionThreadActions(report, transaction, [], policy, transactionThreadReport);
13261327
expect(result).toContain(CONST.REPORT.SECONDARY_ACTIONS.REMOVE_HOLD);
13271328

13281329
// Do not show if admin is the holder
13291330
jest.spyOn(ReportUtils, 'isHoldCreator').mockReturnValue(true);
1330-
const result2 = getSecondaryTransactionThreadActions(report, transaction, [], policy);
1331+
const result2 = getSecondaryTransactionThreadActions(report, transaction, [], policy, transactionThreadReport);
13311332
expect(result2).not.toContain(CONST.REPORT.SECONDARY_ACTIONS.REMOVE_HOLD);
13321333
});
13331334

0 commit comments

Comments
 (0)