git.delta.rocks / unique-network / refs/commits / 239c99e5ac33

difftreelog

chore test with wrong fee for collection creation

Grigoriy Simonov2022-09-27parent: #9ac7a7e.patch.diff
in: master

1 file changed

modifiedtests/src/eth/payable.test.tsdiffbeforeafterboth
171 expect(finalContractBalance == initialContractBalance).to.be.true;171 expect(finalContractBalance == initialContractBalance).to.be.true;
172 });172 });
173
174 itEth('Negative test: call createNFTCollection with wrong fee', async({helper}) => {
175 const SMALL_FEE = 1n * helper.balance.getOneTokenNominal();
176 const BIG_FEE = 3n * helper.balance.getOneTokenNominal();
177 const caller = await helper.eth.createAccountWithBalance(donor);
178 const collectionHelper = helper.ethNativeContract.collectionHelpers(caller);
179
180 await expect(collectionHelper.methods.createNonfungibleCollection('A', 'B', 'C').call({value: Number(SMALL_FEE)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)');
181 await expect(collectionHelper.methods.createNonfungibleCollection('A', 'B', 'C').call({value: Number(BIG_FEE)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)');
182 });
183
184 itEth('Negative test: call createRFTCollection with wrong fee', async({helper}) => {
185 const SMALL_FEE = 1n * helper.balance.getOneTokenNominal();
186 const BIG_FEE = 3n * helper.balance.getOneTokenNominal();
187 const caller = await helper.eth.createAccountWithBalance(donor);
188 const collectionHelper = helper.ethNativeContract.collectionHelpers(caller);
189
190 await expect(collectionHelper.methods.createRFTCollection('A', 'B', 'C').call({value: Number(SMALL_FEE)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)');
191 await expect(collectionHelper.methods.createRFTCollection('A', 'B', 'C').call({value: Number(BIG_FEE)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)');
192 });
173193
174 itEth('Get collection creation fee', async({helper}) => {194 itEth('Get collection creation fee', async({helper}) => {
175 const deployer = await helper.eth.createAccountWithBalance(donor);195 const deployer = await helper.eth.createAccountWithBalance(donor);