tx cont - fix test to use async api

This commit is contained in:
kumavis 2017-07-25 14:39:17 -07:00
parent 4445ba1569
commit 5ec73c0e65
1 changed files with 6 additions and 2 deletions

View File

@ -343,13 +343,17 @@ describe('Transaction Controller', function () {
// Adding the fake tx:
txController.addTx(clone(txMeta))
txController._resubmitTx(txMeta, function (err) {
assert.ifError(err, 'should not throw an error')
txController._resubmitTx(txMeta)
.then(() => {
const updatedMeta = txController.getTx(txMeta.id)
assert.notEqual(updatedMeta.status, txMeta.status, 'status changed.')
assert.equal(updatedMeta.status, 'failed', 'tx set to failed.')
done()
})
.catch((err) => {
assert.ifError(err, 'should not throw an error')
done()
})
})
})
})