difftreelog
Test fix: use send instead of call
in: master
1 file changed
tests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth80 const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true);80 const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true);81 81 82 // cannot mint while not admin82 // cannot mint while not admin83 await expect(collectionEvm.methods.mint(owner).call({from: adminEth})).to.be.rejectedWith('PublicMintingNotAllowed');83 await expect(collectionEvm.methods.mint(owner).send({from: adminEth})).to.be.rejectedWith('PublicMintingNotAllowed');84 84 85 // admin can mint token:85 // admin can mint token:86 await collectionEvm.methods.addCollectionAdminCross(adminCrossEth).send();86 await collectionEvm.methods.addCollectionAdminCross(adminCrossEth).send();87 const result = await collectionEvm.methods.mint(owner).call({from: adminEth});87 await collectionEvm.methods.mint(owner).send({from: adminEth});888889 // TODO: Why fail90 expect(await helper.collection.getLastTokenId(collectionId)).to.eq(1);89 expect(await helper.collection.getLastTokenId(collectionId)).to.eq(1);91 });90 });9291