aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/exchange
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-04-27 05:51:45 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-05-01 07:40:27 +0800
commitbbb3d5bb67f602a14f58f9a01ab94f498a400cc6 (patch)
tree0533d81bbf27b23c1377a308ac9bf6d7e2ac6c16 /packages/contracts/test/exchange
parent63ad2ebf0bb9b78bbfc2190390fab83e7c0639b6 (diff)
downloaddexon-sol-tools-bbb3d5bb67f602a14f58f9a01ab94f498a400cc6.tar
dexon-sol-tools-bbb3d5bb67f602a14f58f9a01ab94f498a400cc6.tar.gz
dexon-sol-tools-bbb3d5bb67f602a14f58f9a01ab94f498a400cc6.tar.bz2
dexon-sol-tools-bbb3d5bb67f602a14f58f9a01ab94f498a400cc6.tar.lz
dexon-sol-tools-bbb3d5bb67f602a14f58f9a01ab94f498a400cc6.tar.xz
dexon-sol-tools-bbb3d5bb67f602a14f58f9a01ab94f498a400cc6.tar.zst
dexon-sol-tools-bbb3d5bb67f602a14f58f9a01ab94f498a400cc6.zip
Add hard coded proxyId into each AssetProxy
Diffstat (limited to 'packages/contracts/test/exchange')
-rw-r--r--packages/contracts/test/exchange/dispatcher.ts12
1 files changed, 12 insertions, 0 deletions
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', () => {