aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/tx-controller-test.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-05-17 08:06:19 +0800
committerDan Finlay <dan@danfinlay.com>2017-05-17 08:06:19 +0800
commitc6fd5090519af64bbe3d29346484bcf45572d3c2 (patch)
treeac80f947b897205fabffa2db57dcead462f8c167 /test/unit/tx-controller-test.js
parentc1bef31d9d3b2cf091ac94c908700c3c0081318f (diff)
downloadtangerine-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/unit/tx-controller-test.js')
-rw-r--r--test/unit/tx-controller-test.js6
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')
})