From bbb3d5bb67f602a14f58f9a01ab94f498a400cc6 Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Thu, 26 Apr 2018 14:51:45 -0700 Subject: Add hard coded proxyId into each AssetProxy --- packages/contracts/test/exchange/dispatcher.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'packages/contracts/test/exchange') diff --git a/packages/contracts/test/exchange/dispatcher.ts b/packages/contracts/test/exchange/dispatcher.ts index 1c346c93f..31f5f5dbb 100644 --- a/packages/contracts/test/exchange/dispatcher.ts +++ b/packages/contracts/test/exchange/dispatcher.ts @@ -194,6 +194,18 @@ describe('AssetProxyDispatcher', () => { ), ).to.be.rejectedWith(constants.REVERT); }); + + it('should throw if attempting to register a proxy to the incorrect id', async () => { + const prevProxyAddress = ZeroEx.NULL_ADDRESS; + return expect( + assetProxyDispatcher.registerAssetProxy.sendTransactionAsync( + AssetProxyId.ERC721, + erc20Proxy.address, + prevProxyAddress, + { from: owner }, + ), + ).to.be.rejectedWith(constants.REVERT); + }); }); describe('getAssetProxy', () => { -- cgit v1.2.3