diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-09-14 05:07:22 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-09-14 05:07:22 +0800 |
commit | 59909601b887b2ed8473bea5a28b852668b2804e (patch) | |
tree | 31d4a23044907a21839a29fd0035d6d76409d472 /test | |
parent | 9e0c0745ab0f2aa207b0c062ad11efd8df1bb6c5 (diff) | |
download | tangerine-wallet-browser-59909601b887b2ed8473bea5a28b852668b2804e.tar tangerine-wallet-browser-59909601b887b2ed8473bea5a28b852668b2804e.tar.gz tangerine-wallet-browser-59909601b887b2ed8473bea5a28b852668b2804e.tar.bz2 tangerine-wallet-browser-59909601b887b2ed8473bea5a28b852668b2804e.tar.lz tangerine-wallet-browser-59909601b887b2ed8473bea5a28b852668b2804e.tar.xz tangerine-wallet-browser-59909601b887b2ed8473bea5a28b852668b2804e.tar.zst tangerine-wallet-browser-59909601b887b2ed8473bea5a28b852668b2804e.zip |
add test for pendingTxCount
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/tx-controller-test.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js index 479010b87..47bfe66f8 100644 --- a/test/unit/tx-controller-test.js +++ b/test/unit/tx-controller-test.js @@ -59,6 +59,19 @@ describe('Transaction Controller', function () { }) }) + describe('#getPendingTxCount', function () { + it('should return the number of pending txs', function () { + txController.txStateManager._saveTxList([ + { id: 1, status: 'submitted', metamaskNetworkId: currentNetworkId, txParams: {} }, + { id: 2, status: 'submitted', metamaskNetworkId: currentNetworkId, txParams: {} }, + { id: 3, status: 'submitted', metamaskNetworkId: currentNetworkId, txParams: {} }, + ]) + const pendingTxCount = txController.getPendingTxCount() + assert.equal(pendingTxCount, 3, 'should be 3') + }) + }) + + describe('#newUnapprovedTransaction', function () { let stub, txMeta, txParams beforeEach(function () { |