difftreelog
fix types in tests
in: master
3 files changed
tests/src/burnItem.test.tsdiffbeforeafterboth--- a/tests/src/burnItem.test.ts
+++ b/tests/src/burnItem.test.ts
@@ -197,13 +197,12 @@
expect(await tokenBob.getOwner()).to.deep.eq({Substrate: bob.address});
// 4. Storage is not corrupted:
await tokenAlice.transfer(alice, {Substrate: bob.address});
- await tokenBob.transfer(alice, {Substrate: alice.address});
+ await tokenBob.transfer(bob, {Substrate: alice.address});
expect(await tokenAlice.getOwner()).to.deep.eq({Substrate: bob.address});
expect(await tokenBob.getOwner()).to.deep.eq({Substrate: alice.address});
});
itSub('zero burnFrom NFT', async ({helper}) => {
- const api = helper.getApi();
const collection = await helper.nft.mintCollection(alice, {name: 'Zero', description: 'Zero transfer', tokenPrefix: 'TF'});
const notApprovedNft = await collection.mintToken(alice, {Substrate: bob.address});
const approvedNft = await collection.mintToken(alice, {Substrate: bob.address});
@@ -212,7 +211,7 @@
// 1. Zero burnFrom of non-existing tokens not allowed:
await expect(helper.executeExtrinsic(alice, 'api.tx.unique.burnFrom', [collection.collectionId, {Substrate: bob.address}, 9999, 0])).to.be.rejectedWith('common.ApprovedValueTooLow');
// 2. Zero burnFrom of not approved tokens not allowed:
- await expect(helper.executeExtrinsic(alice, 'api.tx.unique.burnFrom', [collection.collectionId, {Substrate: bob.address}, notApprovedNft.tokenId, 0])).to.be.rejectedWith('common.NoPermission');
+ await expect(helper.executeExtrinsic(alice, 'api.tx.unique.burnFrom', [collection.collectionId, {Substrate: bob.address}, notApprovedNft.tokenId, 0])).to.be.rejectedWith('common.ApprovedValueTooLow');
// 3. Zero burnFrom of approved tokens allowed:
await helper.executeExtrinsic(alice, 'api.tx.unique.burnFrom', [collection.collectionId, {Substrate: bob.address}, approvedNft.tokenId, 0]);
tests/src/transfer.test.tsdiffbeforeafterboth--- a/tests/src/transfer.test.ts
+++ b/tests/src/transfer.test.ts
@@ -206,7 +206,7 @@
expect(await tokenBob.getOwner()).to.deep.eq({Substrate: bob.address});
// 4. Storage is not corrupted:
await tokenAlice.transfer(alice, {Substrate: bob.address});
- await tokenBob.transfer(alice, {Substrate: alice.address});
+ await tokenBob.transfer(bob, {Substrate: alice.address});
expect(await tokenAlice.getOwner()).to.deep.eq({Substrate: bob.address});
expect(await tokenBob.getOwner()).to.deep.eq({Substrate: alice.address});
});
tests/src/transferFrom.test.tsdiffbeforeafterboth359 // 1. Cannot zero transferFrom (non-existing token)359 // 1. Cannot zero transferFrom (non-existing token)360 await expect(helper.executeExtrinsic(alice, 'api.tx.unique.transferFrom', [{Substrate: bob.address}, {Substrate: alice.address}, collection.collectionId, 9999, 0])).to.be.rejectedWith('common.ApprovedValueTooLow');360 await expect(helper.executeExtrinsic(alice, 'api.tx.unique.transferFrom', [{Substrate: bob.address}, {Substrate: alice.address}, collection.collectionId, 9999, 0])).to.be.rejectedWith('common.ApprovedValueTooLow');361 // 2. Cannot zero transferFrom (not approved token)361 // 2. Cannot zero transferFrom (not approved token)362 await expect(helper.executeExtrinsic(alice, 'api.tx.unique.transferFrom', [{Substrate: bob.address}, {Substrate: alice.address}, collection.collectionId, notApprovedNft.tokenId, 0])).to.be.rejectedWith('common.NoPermission');362 await expect(helper.executeExtrinsic(alice, 'api.tx.unique.transferFrom', [{Substrate: bob.address}, {Substrate: alice.address}, collection.collectionId, notApprovedNft.tokenId, 0])).to.be.rejectedWith('common.ApprovedValueTooLow');363 // 3. Can zero transferFrom (approved token):363 // 3. Can zero transferFrom (approved token):364 await helper.executeExtrinsic(alice, 'api.tx.unique.transferFrom', [{Substrate: bob.address}, {Substrate: alice.address}, collection.collectionId, approvedNft.tokenId, 0]);364 await helper.executeExtrinsic(alice, 'api.tx.unique.transferFrom', [{Substrate: bob.address}, {Substrate: alice.address}, collection.collectionId, approvedNft.tokenId, 0]);365365