diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-07-04 04:42:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-04 04:42:30 +0800 |
commit | d91b30faef0e53072757dfd5fea86db10dcf838f (patch) | |
tree | 5c48b7bdcec58668656d11e10cc3d8bee7680dac /packages/contracts/test/exchange/dispatcher.ts | |
parent | 9b864517e2402d766b285098040787c62dfcd99d (diff) | |
parent | dc956020ef7c6d3f1880263700422b31253c8da3 (diff) | |
download | dexon-sol-tools-d91b30faef0e53072757dfd5fea86db10dcf838f.tar dexon-sol-tools-d91b30faef0e53072757dfd5fea86db10dcf838f.tar.gz dexon-sol-tools-d91b30faef0e53072757dfd5fea86db10dcf838f.tar.bz2 dexon-sol-tools-d91b30faef0e53072757dfd5fea86db10dcf838f.tar.lz dexon-sol-tools-d91b30faef0e53072757dfd5fea86db10dcf838f.tar.xz dexon-sol-tools-d91b30faef0e53072757dfd5fea86db10dcf838f.tar.zst dexon-sol-tools-d91b30faef0e53072757dfd5fea86db10dcf838f.zip |
Merge pull request #812 from 0xProject/fix/revert-assertions-improvements
Improve robustness of revert reason assertions
Diffstat (limited to 'packages/contracts/test/exchange/dispatcher.ts')
-rw-r--r-- | packages/contracts/test/exchange/dispatcher.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/contracts/test/exchange/dispatcher.ts b/packages/contracts/test/exchange/dispatcher.ts index afbf958d9..94ada1ef2 100644 --- a/packages/contracts/test/exchange/dispatcher.ts +++ b/packages/contracts/test/exchange/dispatcher.ts @@ -14,7 +14,7 @@ import { TestAssetProxyDispatcherContract, } from '../../generated_contract_wrappers/test_asset_proxy_dispatcher'; import { artifacts } from '../utils/artifacts'; -import { expectRevertReasonOrAlwaysFailingTransactionAsync } from '../utils/assertions'; +import { expectTransactionFailedAsync } from '../utils/assertions'; import { chaiSetup } from '../utils/chai_setup'; import { constants } from '../utils/constants'; import { ERC20Wrapper } from '../utils/erc20_wrapper'; @@ -129,7 +129,7 @@ describe('AssetProxyDispatcher', () => { txDefaults, ); // Register new ERC20 Transfer Proxy contract - return expectRevertReasonOrAlwaysFailingTransactionAsync( + return expectTransactionFailedAsync( assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(newErc20TransferProxy.address, { from: owner, }), @@ -138,7 +138,7 @@ describe('AssetProxyDispatcher', () => { }); it('should throw if requesting address is not owner', async () => { - return expectRevertReasonOrAlwaysFailingTransactionAsync( + return expectTransactionFailedAsync( assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, { from: notOwner }), RevertReason.OnlyContractOwner, ); @@ -210,7 +210,7 @@ describe('AssetProxyDispatcher', () => { const encodedAssetData = assetProxyUtils.encodeERC20AssetData(zrxToken.address); // Perform a transfer from makerAddress to takerAddress const amount = new BigNumber(10); - return expectRevertReasonOrAlwaysFailingTransactionAsync( + return expectTransactionFailedAsync( assetProxyDispatcher.publicDispatchTransferFrom.sendTransactionAsync( encodedAssetData, makerAddress, |