From b21f6738f543c58021e4371ad5c648e647eba91e Mon Sep 17 00:00:00 2001 From: Greg Zaitsev Date: Wed, 03 Feb 2021 16:28:44 +0000 Subject: [PATCH] CreateMutipleItems: Fix getting non-existing collection ID --- --- a/tests/src/createMultipleItems.test.ts +++ b/tests/src/createMultipleItems.test.ts @@ -113,10 +113,10 @@ it('Create token in not existing collection', async () => { await usingApi(async (api: ApiPromise) => { - const collectionId = await createCollectionExpectSuccess(); + const collectionId = parseInt((await api.query.nft.createdCollectionCount()).toString()) + 1; const Alice = privateKey('//Alice'); const createMultipleItemsTx = await api.tx.nft - .createMultipleItems(collectionId + 1, Alice.address, ['NFT', 'NFT', 'NFT']); + .createMultipleItems(collectionId, Alice.address, ['NFT', 'NFT', 'NFT']); await expect(submitTransactionExpectFailAsync(Alice, createMultipleItemsTx)).to.be.rejected; }); }); -- gitstuff