test - tx controller - fix promise handling

feature/default_network_editable
kumavis 8 years ago committed by GitHub
parent ab8bae421e
commit f5de16c911
  1. 7
      test/unit/tx-controller-test.js

@ -270,7 +270,7 @@ describe('Transaction Controller', function () {
})
it('does not overwrite set values', function (done) {
it('does not overwrite set values', function () {
this.timeout(15000)
const wrongValue = '0x05'
@ -289,9 +289,7 @@ describe('Transaction Controller', function () {
const pubStub = sinon.stub(txController.txProviderUtils, 'publishTransaction')
.callsArgWithAsync(1, null, originalValue)
txController.approveTransaction(txMeta.id).then((err) => {
assert.ifError(err, 'should not error')
return txController.approveTransaction(txMeta.id).then(() => {
const result = txController.getTx(txMeta.id)
const params = result.txParams
@ -303,7 +301,6 @@ describe('Transaction Controller', function () {
priceStub.restore()
signStub.restore()
pubStub.restore()
done()
})
})
})

Loading…
Cancel
Save