From c6fd5090519af64bbe3d29346484bcf45572d3c2 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 16 May 2017 17:06:19 -0700 Subject: Improve test --- test/unit/tx-controller-test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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') }) -- cgit