difftreelog
CreateMutipleItems: Fix getting non-existing collection ID
in: master
1 file changed
tests/src/createMultipleItems.test.tsdiffbeforeafterboth113113114 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.nft119 .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 });