diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-05-23 08:52:27 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-05-24 06:09:17 +0800 |
commit | b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96 (patch) | |
tree | 8ab5d6d7cbe3834f91947518898aba0ecd764d8e /packages/contracts/test/asset_proxy/authorizable.ts | |
parent | f6b81f588d98e09e7a5806902d94e2892d029481 (diff) | |
download | dexon-0x-contracts-b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96.tar.gz dexon-0x-contracts-b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96.tar.zst dexon-0x-contracts-b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96.zip |
Check transaction receipt status codes where applicable
Diffstat (limited to 'packages/contracts/test/asset_proxy/authorizable.ts')
-rw-r--r-- | packages/contracts/test/asset_proxy/authorizable.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/contracts/test/asset_proxy/authorizable.ts b/packages/contracts/test/asset_proxy/authorizable.ts index 52e9ea87f..87f89c513 100644 --- a/packages/contracts/test/asset_proxy/authorizable.ts +++ b/packages/contracts/test/asset_proxy/authorizable.ts @@ -48,7 +48,7 @@ describe('Authorizable', () => { ).to.be.rejectedWith(constants.REVERT); }); it('should allow owner to add an authorized address', async () => { - await web3Wrapper.awaitTransactionMinedAsync( + await web3Wrapper.awaitTransactionSuccessAsync( await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }), constants.AWAIT_TRANSACTION_MINED_MS, ); @@ -56,7 +56,7 @@ describe('Authorizable', () => { expect(isAuthorized).to.be.true(); }); it('should throw if owner attempts to authorize a duplicate address', async () => { - await web3Wrapper.awaitTransactionMinedAsync( + await web3Wrapper.awaitTransactionSuccessAsync( await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }), constants.AWAIT_TRANSACTION_MINED_MS, ); @@ -68,7 +68,7 @@ describe('Authorizable', () => { describe('removeAuthorizedAddress', () => { it('should throw if not called by owner', async () => { - await web3Wrapper.awaitTransactionMinedAsync( + await web3Wrapper.awaitTransactionSuccessAsync( await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }), constants.AWAIT_TRANSACTION_MINED_MS, ); @@ -80,11 +80,11 @@ describe('Authorizable', () => { }); it('should allow owner to remove an authorized address', async () => { - await web3Wrapper.awaitTransactionMinedAsync( + await web3Wrapper.awaitTransactionSuccessAsync( await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }), constants.AWAIT_TRANSACTION_MINED_MS, ); - await web3Wrapper.awaitTransactionMinedAsync( + await web3Wrapper.awaitTransactionSuccessAsync( await authorizable.removeAuthorizedAddress.sendTransactionAsync(address, { from: owner, }), @@ -107,7 +107,7 @@ describe('Authorizable', () => { it('should return all authorized addresses', async () => { const initial = await authorizable.getAuthorizedAddresses.callAsync(); expect(initial).to.have.length(0); - await web3Wrapper.awaitTransactionMinedAsync( + await web3Wrapper.awaitTransactionSuccessAsync( await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner, }), @@ -117,7 +117,7 @@ describe('Authorizable', () => { expect(afterAdd).to.have.length(1); expect(afterAdd).to.include(address); - await web3Wrapper.awaitTransactionMinedAsync( + await web3Wrapper.awaitTransactionSuccessAsync( await authorizable.removeAuthorizedAddress.sendTransactionAsync(address, { from: owner, }), |