diff options
author | Esteban MiƱo <efmino@uc.cl> | 2018-07-21 08:09:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-21 08:09:37 +0800 |
commit | 110efa9ec1525b5fd925de5a0d9350c40823464b (patch) | |
tree | 3cfe09a52c4c6b86ced28a32c2190ccf5c3084a2 /test/unit/app/controllers/transactions/tx-controller-test.js | |
parent | 9c955549338f49d8b5eb6ca003c2c65c725aa328 (diff) | |
parent | e094d4ad1fb84a9bc663c328d0650bd9d8bf8716 (diff) | |
download | tangerine-wallet-browser-110efa9ec1525b5fd925de5a0d9350c40823464b.tar.gz tangerine-wallet-browser-110efa9ec1525b5fd925de5a0d9350c40823464b.tar.zst tangerine-wallet-browser-110efa9ec1525b5fd925de5a0d9350c40823464b.zip |
Merge branch 'develop' into detectTokenFeature
Diffstat (limited to 'test/unit/app/controllers/transactions/tx-controller-test.js')
-rw-r--r-- | test/unit/app/controllers/transactions/tx-controller-test.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/unit/app/controllers/transactions/tx-controller-test.js b/test/unit/app/controllers/transactions/tx-controller-test.js index d4c5ff0ec..26dc7b656 100644 --- a/test/unit/app/controllers/transactions/tx-controller-test.js +++ b/test/unit/app/controllers/transactions/tx-controller-test.js @@ -353,9 +353,16 @@ describe('Transaction Controller', function () { ]) }) - it('should set the transaction to rejected from unapproved', async function () { - await txController.cancelTransaction(0) - assert.equal(txController.txStateManager.getTx(0).status, 'rejected') + it('should emit a status change to rejected', function (done) { + txController.once('tx:status-update', (txId, status) => { + try { + assert.equal(status, 'rejected', 'status should e rejected') + assert.equal(txId, 0, 'id should e 0') + done() + } catch (e) { done(e) } + }) + + txController.cancelTransaction(0) }) }) |