git.delta.rocks / unique-network / refs/commits / f5f52d9f9e3f

difftreelog

chore add test for rft2nft

Grigoriy Simonov2022-08-11parent: #59980bb.patch.diff
in: master

1 file changed

modifiedtests/src/eth/fractionalizer/fractionalizer.test.tsdiffbeforeafterboth
299 await expect(fractionalizer.methods.rft2nft(rftCollectionAddress, rftTokenId).send()).to.be.eventually.rejected;299 await expect(fractionalizer.methods.rft2nft(rftCollectionAddress, rftTokenId).send()).to.be.eventually.rejected;
300 });300 });
301
302 itWeb3('call rft2nft for RFT token that was not minted by fractionalizer contract', async ({api, web3, privateKeyWrapper}) => {
303 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
304 const {collectionIdAddress: rftCollectionAddress} = await createRefungibleCollection(api, web3, owner);
305
306 const fractionalizer = await deployFractionalizer(api, web3, owner);
307 const refungibleContract = uniqueRefungible(web3, rftCollectionAddress, owner);
308
309 await refungibleContract.methods.addCollectionAdmin(fractionalizer.options.address).send();
310 await fractionalizer.methods.setRFTCollection(rftCollectionAddress).send();
311
312 const rftTokenId = await refungibleContract.methods.nextTokenId().call();
313 await refungibleContract.methods.mint(owner, rftTokenId).send();
314
315 await expect(await fractionalizer.methods.rft2nft(rftCollectionAddress, rftTokenId).send()).to.be.eventually.rejected;
316 });
301317
302 itWeb3('call rft2nft without owning all RFT pieces', async ({api, web3, privateKeyWrapper}) => {318 itWeb3('call rft2nft without owning all RFT pieces', async ({api, web3, privateKeyWrapper}) => {
303 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);319 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);