diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-05-17 08:06:19 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-05-17 08:06:19 +0800 |
commit | c6fd5090519af64bbe3d29346484bcf45572d3c2 (patch) | |
tree | ac80f947b897205fabffa2db57dcead462f8c167 /test | |
parent | c1bef31d9d3b2cf091ac94c908700c3c0081318f (diff) | |
download | tangerine-wallet-browser-c6fd5090519af64bbe3d29346484bcf45572d3c2.tar tangerine-wallet-browser-c6fd5090519af64bbe3d29346484bcf45572d3c2.tar.gz tangerine-wallet-browser-c6fd5090519af64bbe3d29346484bcf45572d3c2.tar.bz2 tangerine-wallet-browser-c6fd5090519af64bbe3d29346484bcf45572d3c2.tar.lz tangerine-wallet-browser-c6fd5090519af64bbe3d29346484bcf45572d3c2.tar.xz tangerine-wallet-browser-c6fd5090519af64bbe3d29346484bcf45572d3c2.tar.zst tangerine-wallet-browser-c6fd5090519af64bbe3d29346484bcf45572d3c2.zip |
Improve test
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/tx-controller-test.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js index 51e0b9a17..e6645090e 100644 --- a/test/unit/tx-controller-test.js +++ b/test/unit/tx-controller-test.js @@ -3,6 +3,7 @@ const EventEmitter = require('events') const ethUtil = require('ethereumjs-util') const EthTx = require('ethereumjs-tx') const ObservableStore = require('obs-store') +const clone = require('clone') const TransactionController = require('../../app/scripts/controllers/transactions') const noop = () => true const currentNetworkId = 42 @@ -184,8 +185,11 @@ describe('Transaction Controller', function () { }, } + const updatedMeta = clone(txMeta) + txController.addTx(txMeta) - txMeta.txParams.gasPrice = desiredGasPriced + updatedMeta.txParams.gasPrice = desiredGasPriced + txController.updateTx(updatedMeta) var result = txController.getTx('1') assert.equal(result.txParams.gasPrice, desiredGasPriced, 'gas price updated') }) |