Skip to content

Commit f2d2e4e

Browse files
test(transaction-status): cover rejected transition scenarios
Amp-Thread-ID: https://ampcode.com/threads/T-019c7de1-5a6d-74ab-91f4-55ea234b4c45 Co-authored-by: Amp <amp@ampcode.com>
1 parent a35763e commit f2d2e4e

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

app/utils/__tests__/transaction-status.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,22 @@ describe('canUpdateTransactionStatus', () => {
3737
)
3838
).toBe(true)
3939
})
40+
41+
it('allows rejected to be re-verified', () => {
42+
expect(
43+
canUpdateTransactionStatus(
44+
TRANSACTION_STATUS.REJECTED,
45+
TRANSACTION_STATUS.VERIFIED
46+
)
47+
).toBe(true)
48+
})
49+
50+
it('allows rejected to remain rejected', () => {
51+
expect(
52+
canUpdateTransactionStatus(
53+
TRANSACTION_STATUS.REJECTED,
54+
TRANSACTION_STATUS.REJECTED
55+
)
56+
).toBe(true)
57+
})
4058
})

0 commit comments

Comments
 (0)