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

difftreelog

tests: update tests for storage changes

Yaroslav Bolyukin2021-03-12parent: #88101e4.patch.diff
in: master

1 file changed

modifiedtests/src/createCollection.test.tsdiffbeforeafterboth
35describe('(!negative test!) integration test: ext. createCollection():', () => { 35describe('(!negative test!) integration test: ext. createCollection():', () => {
36 it('(!negative test!) create new NFT collection whith incorrect data (mode)', async () => { 36 it('(!negative test!) create new NFT collection whith incorrect data (mode)', async () => {
37 await usingApi(async (api) => { 37 await usingApi(async (api) => {
38 const AcollectionCount = parseInt((await api.query.nft.collectionCount()).toString(), 10); 38 const AcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString(), 10);
39 39
40 const badTransaction = async () => { 40 const badTransaction = async () => {
41 await createCollectionExpectSuccess({mode: {type: 'Invalid'}}); 41 await createCollectionExpectSuccess({mode: {type: 'Invalid'}});
42 }; 42 };
43 // tslint:disable-next-line:no-unused-expression 43 // tslint:disable-next-line:no-unused-expression
44 expect(badTransaction()).to.be.rejected; 44 expect(badTransaction()).to.be.rejected;
45 45
46 const BcollectionCount = parseInt((await api.query.nft.collectionCount()).toString(), 10); 46 const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString(), 10);
47 expect(BcollectionCount).to.be.equal(AcollectionCount, 'Error: Incorrect collection created.'); 47 expect(BcollectionCount).to.be.equal(AcollectionCount, 'Error: Incorrect collection created.');
48 }); 48 });
49 }); 49 });