mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
test - check that #setTxStatusRejected removes transaction from history
This commit is contained in:
parent
8a678001a9
commit
b30499886f
@ -43,6 +43,15 @@ describe('TransactionStateManager', function () {
|
||||
})
|
||||
|
||||
describe('#setTxStatusRejected', function () {
|
||||
it('sets the tx status to rejected and removes it from history', function () {
|
||||
const tx = { id: 1, status: 'unapproved', metamaskNetworkId: currentNetworkId, txParams: {} }
|
||||
txStateManager.addTx(tx)
|
||||
txStateManager.setTxStatusRejected(1)
|
||||
const result = txStateManager.getTxList()
|
||||
assert.ok(Array.isArray(result))
|
||||
assert.equal(result.length, 0)
|
||||
})
|
||||
|
||||
it('should emit a rejected event to signal the exciton of callback', (done) => {
|
||||
const tx = { id: 1, status: 'unapproved', metamaskNetworkId: currentNetworkId, txParams: {} }
|
||||
txStateManager.addTx(tx)
|
||||
|
Loading…
Reference in New Issue
Block a user