git.delta.rocks / unique-network / refs/commits / 6ed42b02ff13

difftreelog

fix use transferFrom in nesting tests

Daniel Shiposha2022-06-29parent: #d5edba8.patch.diff
in: master

1 file changed

modifiedtests/src/nesting/nest.test.tsdiffbeforeafterboth
123 ], 'Children contents check at nesting #2');123 ], 'Children contents check at nesting #2');
124124
125 // Move token B to a different user outside the nesting tree125 // Move token B to a different user outside the nesting tree
126 await transferExpectSuccess(collectionA, tokenB, alice, bob);126 await transferFromExpectSuccess(collectionA, tokenB, alice, targetAddress, bob);
127 children = await getTokenChildren(api, collectionA, targetToken);127 children = await getTokenChildren(api, collectionA, targetToken);
128 expect(children.length).to.be.equal(1, 'Children length check at unnesting');128 expect(children.length).to.be.equal(1, 'Children length check at unnesting');
129 expect(children).to.be.have.deep.members([129 expect(children).to.be.have.deep.members([
470 await expect(executeTransaction(470 await expect(executeTransaction(
471 api, 471 api,
472 alice, 472 alice,
473 api.tx.unique.transfer(targetAddress, collection, newToken, 1),473 api.tx.unique.transferFrom(targetAddress, {Substrate: bob.address}, collection, newToken, 1),
474 ), 'while nesting another\'s token token').to.be.rejectedWith(/common\.AddressNotInAllowlist/);474 ), 'while nesting another\'s token token').to.be.rejectedWith(/common\.AddressNotInAllowlist/);
475 expect(await getTokenOwner(api, collection, newToken)).to.be.deep.equal({Substrate: bob.address});475 expect(await getTokenOwner(api, collection, newToken)).to.be.deep.equal({Substrate: bob.address});
476476