git.delta.rocks / unique-network / refs/commits / 8f5889ccacc9

difftreelog

Test fix: use send instead of call

Max Andreev2022-11-30parent: #6adc689.patch.diff
in: master

1 file changed

modifiedtests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth
80 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 admin
83 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});
8888
89 // TODO: Why fail
90 expect(await helper.collection.getLastTokenId(collectionId)).to.eq(1);89 expect(await helper.collection.getLastTokenId(collectionId)).to.eq(1);
91 });90 });
9291