aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-27 05:17:29 +0800
committerFabio Berger <me@fabioberger.com>2018-06-27 05:17:29 +0800
commit6a2421c683d27b1ec5e2474341c92ae74e98644c (patch)
tree1573b6e850232a42e058db4ac9c8468f3328cbef
parentd66ca7b5cbb5dc90e888c0466326825341d5fda4 (diff)
downloaddexon-sol-tools-6a2421c683d27b1ec5e2474341c92ae74e98644c.tar
dexon-sol-tools-6a2421c683d27b1ec5e2474341c92ae74e98644c.tar.gz
dexon-sol-tools-6a2421c683d27b1ec5e2474341c92ae74e98644c.tar.bz2
dexon-sol-tools-6a2421c683d27b1ec5e2474341c92ae74e98644c.tar.lz
dexon-sol-tools-6a2421c683d27b1ec5e2474341c92ae74e98644c.tar.xz
dexon-sol-tools-6a2421c683d27b1ec5e2474341c92ae74e98644c.tar.zst
dexon-sol-tools-6a2421c683d27b1ec5e2474341c92ae74e98644c.zip
Fix tests
-rw-r--r--packages/contracts/test/asset_proxy/proxies.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/contracts/test/asset_proxy/proxies.ts b/packages/contracts/test/asset_proxy/proxies.ts
index 5f4c5b597..869ba4b2a 100644
--- a/packages/contracts/test/asset_proxy/proxies.ts
+++ b/packages/contracts/test/asset_proxy/proxies.ts
@@ -192,7 +192,7 @@ describe('Asset Transfer Proxies', () => {
});
});
- describe('batchTransferFrom', () => {
+ describe('batchTransferFrom ERC20', () => {
it('should succesfully make multiple token transfers', async () => {
const erc20Balances = await erc20Wrapper.getBalancesAsync();
@@ -443,7 +443,7 @@ describe('Asset Transfer Proxies', () => {
});
});
- describe('batchTransferFrom', () => {
+ describe('batchTransferFrom ERC721', () => {
it('should succesfully make multiple token transfers', async () => {
const erc721TokensById = await erc721Wrapper.getBalancesAsync();
const [makerTokenIdA, makerTokenIdB] = erc721TokensById[makerAddress][erc721Token.address];
@@ -468,7 +468,10 @@ describe('Asset Transfer Proxies', () => {
txHash,
constants.AWAIT_TRANSACTION_MINED_MS,
);
- expect(res.logs.length).to.equal(numTransfers);
+ // During an ERC721 transfer enabled by a specific token approval,
+ // the approval is cleared, emitting an event
+ const numApprovals = 2;
+ expect(res.logs.length).to.equal(numTransfers + numApprovals);
const newOwnerMakerAssetA = await erc721Token.ownerOf.callAsync(makerTokenIdA);
const newOwnerMakerAssetB = await erc721Token.ownerOf.callAsync(makerTokenIdB);