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

difftreelog

CreateMutipleItems: Fix getting non-existing collection ID

Greg Zaitsev2021-02-03parent: #ffe7ca2.patch.diff
in: master

1 file changed

modifiedtests/src/createMultipleItems.test.tsdiffbeforeafterboth
113113
114 it('Create token in not existing collection', async () => {114 it('Create token in not existing collection', async () => {
115 await usingApi(async (api: ApiPromise) => {115 await usingApi(async (api: ApiPromise) => {
116 const collectionId = await createCollectionExpectSuccess();116 const collectionId = parseInt((await api.query.nft.createdCollectionCount()).toString()) + 1;
117 const Alice = privateKey('//Alice');117 const Alice = privateKey('//Alice');
118 const createMultipleItemsTx = await api.tx.nft118 const createMultipleItemsTx = await api.tx.nft
119 .createMultipleItems(collectionId + 1, Alice.address, ['NFT', 'NFT', 'NFT']);119 .createMultipleItems(collectionId, Alice.address, ['NFT', 'NFT', 'NFT']);
120 await expect(submitTransactionExpectFailAsync(Alice, createMultipleItemsTx)).to.be.rejected;120 await expect(submitTransactionExpectFailAsync(Alice, createMultipleItemsTx)).to.be.rejected;
121 });121 });
122 });122 });