aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-07-26 05:39:17 +0800
committerkumavis <aaron@kumavis.me>2017-07-26 05:39:17 +0800
commit5ec73c0e652f5389d14d00abed3977324043a824 (patch)
treed95f3f93fbf58d424a62169b05dd89f6c390ec88 /test
parent4445ba15694fc6ef7f9c4e3a2de5de5428e28b3a (diff)
downloadtangerine-wallet-browser-5ec73c0e652f5389d14d00abed3977324043a824.tar
tangerine-wallet-browser-5ec73c0e652f5389d14d00abed3977324043a824.tar.gz
tangerine-wallet-browser-5ec73c0e652f5389d14d00abed3977324043a824.tar.bz2
tangerine-wallet-browser-5ec73c0e652f5389d14d00abed3977324043a824.tar.lz
tangerine-wallet-browser-5ec73c0e652f5389d14d00abed3977324043a824.tar.xz
tangerine-wallet-browser-5ec73c0e652f5389d14d00abed3977324043a824.tar.zst
tangerine-wallet-browser-5ec73c0e652f5389d14d00abed3977324043a824.zip
tx cont - fix test to use async api
Diffstat (limited to 'test')
-rw-r--r--test/unit/tx-controller-test.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js
index 7b86cfe14..31908569a 100644
--- a/test/unit/tx-controller-test.js
+++ b/test/unit/tx-controller-test.js
@@ -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()
+ })
})
})
})