diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-05 09:10:42 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-07 03:40:30 +0800 |
commit | bca62c813d2e821c56968916615861366402435b (patch) | |
tree | 041ea056d813b0db32520f7ca9e25e9799530c47 /packages/contracts/test/asset_proxy_owner.ts | |
parent | ae1cf74dcd84b0a39a5781f63c1c3f2beb0e1857 (diff) | |
download | dexon-0x-contracts-bca62c813d2e821c56968916615861366402435b.tar.gz dexon-0x-contracts-bca62c813d2e821c56968916615861366402435b.tar.zst dexon-0x-contracts-bca62c813d2e821c56968916615861366402435b.zip |
Throw in web3-wrapper when rawCallResult is '0x'
Diffstat (limited to 'packages/contracts/test/asset_proxy_owner.ts')
-rw-r--r-- | packages/contracts/test/asset_proxy_owner.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/contracts/test/asset_proxy_owner.ts b/packages/contracts/test/asset_proxy_owner.ts index c7d4e08ed..c4085cb41 100644 --- a/packages/contracts/test/asset_proxy_owner.ts +++ b/packages/contracts/test/asset_proxy_owner.ts @@ -15,7 +15,7 @@ import { } from '../src/contract_wrappers/generated/asset_proxy_owner'; import { MixinAuthorizableContract } from '../src/contract_wrappers/generated/mixin_authorizable'; import { artifacts } from '../src/utils/artifacts'; -import { expectRevertOrAlwaysFailingTransaction } from '../src/utils/assertions'; +import { expectRevertOrAlwaysFailingTransaction, expectRevertOrContractCallFailed } from '../src/utils/assertions'; import { chaiSetup } from '../src/utils/chai_setup'; import { constants } from '../src/utils/constants'; import { increaseTimeAndMineBlockAsync } from '../src/utils/increase_time'; @@ -118,15 +118,13 @@ describe('AssetProxyOwner', () => { }); describe('isFunctionRemoveAuthorizedAddress', () => { - // TODO(albrow): - // AssertionError: expected promise to be rejected with an error including 'revert' but got 'invalid data for function output (arg="data", errorArg=null, errorValue="0x", value="0x", reason="insufficient data for boolean type")' - it.skip('should throw if data is not for removeAuthorizedAddress', async () => { + it('should throw if data is not for removeAuthorizedAddress', async () => { const notRemoveAuthorizedAddressData = erc20Proxy.addAuthorizedAddress.getABIEncodedTransactionData( owners[0], ); - return expect( + return expectRevertOrContractCallFailed( multiSig.isFunctionRemoveAuthorizedAddress.callAsync(notRemoveAuthorizedAddressData), - ).to.be.rejectedWith(constants.REVERT); + ); }); it('should return true if data is for removeAuthorizedAddress', async () => { |