difftreelog
Add a check to admin test
in: master
1 file changed
tests/src/addCollectionAdmin.test.tsdiffbeforeafterboth46 const changeAdminTxCharlie = api.tx.nft.addCollectionAdmin(collectionId, Charlie.address);
46 const changeAdminTxCharlie = api.tx.nft.addCollectionAdmin(collectionId, Charlie.address);
47 await submitTransactionAsync(Bob, changeAdminTxCharlie);
47 await submitTransactionAsync(Bob, changeAdminTxCharlie);
48 const adminListAfterAddNewAdmin: any = (await api.query.nft.adminList(collectionId));
48 const adminListAfterAddNewAdmin: any = (await api.query.nft.adminList(collectionId));
49 expect(adminListAfterAddNewAdmin).to.be.contains(Bob.address);
49 expect(adminListAfterAddNewAdmin).to.be.contains(Charlie.address);
50 expect(adminListAfterAddNewAdmin).to.be.contains(Charlie.address);
50 });
51 });
51 });
52 });
83 });
84 });
84 });
85 });
85
86
86 it("Can't add collection admin of destroyed collection.", async () => {
87 it("Can't add an admin to a destroyed collection.", async () => {
87 await usingApi(async (api) => {
88 await usingApi(async (api) => {
88 const collectionId = await createCollectionExpectSuccess();
89 const collectionId = await createCollectionExpectSuccess();
89 const Alice = privateKey('//Alice');
90 const Alice = privateKey('//Alice');