@0x:contracts-exchange
Added a test to ensure that registerAssetProxy
will fail for non-contract proxies
This commit is contained in:
parent
3432083343
commit
13d5a5e2ec
@ -146,6 +146,14 @@ describe('AssetProxyDispatcher', () => {
|
|||||||
return expect(tx).to.revertWith(expectedError);
|
return expect(tx).to.revertWith(expectedError);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should revert if the proxy is not a contract address', async () => {
|
||||||
|
const errMessage = 'VM Exception while processing transaction: revert';
|
||||||
|
const tx = assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(notOwner, {
|
||||||
|
from: owner,
|
||||||
|
});
|
||||||
|
return expect(tx).to.be.rejectedWith(errMessage);
|
||||||
|
});
|
||||||
|
|
||||||
it('should log an event with correct arguments when an asset proxy is registered', async () => {
|
it('should log an event with correct arguments when an asset proxy is registered', async () => {
|
||||||
const logDecoder = new LogDecoder(web3Wrapper, artifacts);
|
const logDecoder = new LogDecoder(web3Wrapper, artifacts);
|
||||||
const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
|
const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user