difftreelog
transferFail
in: master
2 files changed
tests/src/transfer.test.tsdiffbeforeafterboth--- a/tests/src/transfer.test.ts
+++ b/tests/src/transfer.test.ts
@@ -19,7 +19,7 @@
transferExpectSuccess,
} from './util/helpers';
-/*describe('Integration Test Transfer(recipient, collection_id, item_id, value)', () => {
+describe('Integration Test Transfer(recipient, collection_id, item_id, value)', () => {
it('Balance transfers and check balance', async () => {
await usingApi(async (api: ApiPromise) => {
const [alicesBalanceBefore, bobsBalanceBefore] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);
@@ -78,10 +78,10 @@
newReFungibleTokenId, Alice, Bob, 1, 'ReFungible');
});
});
-});*/
+});
describe('Negative Integration Test Transfer(recipient, collection_id, item_id, value)', () => {
- /*it('Transfer with not existed collection_id', async () => {
+ it('Transfer with not existed collection_id', async () => {
await usingApi(async (api: ApiPromise) => {
const Alice = privateKey('//Alice');
const Bob = privateKey('//Bob');
@@ -158,7 +158,7 @@
await transferExpectFail(reFungibleCollectionId,
newReFungibleTokenId, Alice, Bob, 1, 'ReFungible');
});
- });*/
+ });
it('Transfer with recipient that is not owner', async () => {
await usingApi(async (api: ApiPromise) => {
const Alice = privateKey('//Alice');
tests/src/util/helpers.tsdiffbeforeafterboth521 await usingApi(async (api: ApiPromise) => {521 await usingApi(async (api: ApiPromise) => {522 const transferTx = await api.tx.nft.transfer(recipient.address, collectionId, tokenId, value);522 const transferTx = await api.tx.nft.transfer(recipient.address, collectionId, tokenId, value);523 const events = await expect(submitTransactionExpectFailAsync(sender, transferTx)).to.be.rejected;523 const events = await expect(submitTransactionExpectFailAsync(sender, transferTx)).to.be.rejected;524 if (events && Array.isArray(events)) {524 const result = getCreateCollectionResult(events);525 const result = getCreateCollectionResult(events);525 // tslint:disable-next-line:no-unused-expression526 // tslint:disable-next-line:no-unused-expression526 expect(result.success).to.be.false;527 expect(result.success).to.be.false;528 }527 });529 });528}530}529531627 const collection: any = (await api.query.nft.collection(collectionId)).toJSON();629 const collection: any = (await api.query.nft.collection(collectionId)).toJSON();628630629 // What to expect631 // What to expect632 // tslint:disable-next-line:no-unused-expression630 expect(result.success).to.be.true;633 expect(result.success).to.be.true;631 expect(collection.MintMode).to.be.equal(true);634 expect(collection.MintMode).to.be.equal(true);632 });635 });