difftreelog
Use uint32 max value for collection id
in: master
1 file changed
tests/src/approve.test.tsdiffbeforeafterboth386 let alice: IKeyringPair;386 let alice: IKeyringPair;387 let bob: IKeyringPair;387 let bob: IKeyringPair;388 let charlie: IKeyringPair;388 let charlie: IKeyringPair;389 const NONEXISTENT_COLLECTION = (2 ** 32) - 1;389390390 before(async () => {391 before(async () => {391 await usingPlaygrounds(async (helper, privateKey) => {392 await usingPlaygrounds(async (helper, privateKey) => {395 });396 });396397397 itSub('[nft] Approve for a collection that does not exist', async ({helper}) => {398 itSub('[nft] Approve for a collection that does not exist', async ({helper}) => {398 const collectionId = 999999;399 const approveTx = (helper.nft as any)[testCase.method](bob, collectionId, 1, {Substrate: charlie.address});399 const approveTx = (helper.nft as any)[testCase.method](bob, NONEXISTENT_COLLECTION, 1, {Substrate: charlie.address});400 await expect(approveTx).to.be.rejectedWith('common.CollectionNotFound');400 await expect(approveTx).to.be.rejectedWith('common.CollectionNotFound');401 });401 });402402403 itSub('[fungible] Approve for a collection that does not exist', async ({helper}) => {403 itSub('[fungible] Approve for a collection that does not exist', async ({helper}) => {404 const collectionId = 999999;405 const approveTx = (helper.ft as any)[testCase.method](bob, collectionId, 1, {Substrate: charlie.address});404 const approveTx = (helper.ft as any)[testCase.method](bob, NONEXISTENT_COLLECTION, 1, {Substrate: charlie.address});406 await expect(approveTx).to.be.rejectedWith('common.CollectionNotFound');405 await expect(approveTx).to.be.rejectedWith('common.CollectionNotFound');407 });406 });408407409 itSub.ifWithPallets('[refungible] Approve for a collection that does not exist', [Pallets.ReFungible], async ({helper}) => {408 itSub.ifWithPallets('[refungible] Approve for a collection that does not exist', [Pallets.ReFungible], async ({helper}) => {410 const collectionId = 999999;411 const approveTx = (helper.rft as any)[testCase.method](bob, collectionId, 1, {Substrate: charlie.address});409 const approveTx = (helper.rft as any)[testCase.method](bob, NONEXISTENT_COLLECTION, 1, {Substrate: charlie.address});412 await expect(approveTx).to.be.rejectedWith('common.CollectionNotFound');410 await expect(approveTx).to.be.rejectedWith('common.CollectionNotFound');413 });411 });414412