Skip to content

Commit 30be12b

Browse files
committed
Add thread from manual submit action test
1 parent a0e65b3 commit 30be12b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/unit/ReportUtilsTest.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,30 @@ describe('ReportUtils', () => {
270270
});
271271
});
272272
});
273+
274+
describe('ParentReportAction is', () => {
275+
test('Manually Submitted Report Action', () => {
276+
const threadOfSubmittedReportAction = {
277+
...LHNTestUtils.getFakeReport(),
278+
type: CONST.REPORT.TYPE.EXPENSE,
279+
stateNum: CONST.REPORT.STATE_NUM.SUBMITTED,
280+
statusNum: CONST.REPORT.STATUS_NUM.SUBMITTED,
281+
parentReportID: '101',
282+
policyID: policy.id,
283+
};
284+
const submittedParentReportAction = {
285+
actionName: CONST.REPORT.ACTIONS.TYPE.SUBMITTED,
286+
originalMessage: {
287+
amount: 169,
288+
currency: 'USD',
289+
},
290+
} as ReportAction;
291+
292+
expect(
293+
ReportUtils.getReportName(threadOfSubmittedReportAction, policy, submittedParentReportAction),
294+
).toBe('submitted $1.69');
295+
});
296+
});
273297
});
274298

275299
describe('requiresAttentionFromCurrentUser', () => {

0 commit comments

Comments
 (0)