From c93335deb111644e377fbd3f16bc78e6fbf293a4 Mon Sep 17 00:00:00 2001 From: 0xb337r007 <0xe4e5@proton.me> Date: Mon, 15 May 2023 11:27:15 +0200 Subject: [PATCH] test burnable only by owner --- test/mvp/CollectibleV1.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/mvp/CollectibleV1.ts b/test/mvp/CollectibleV1.ts index eb58e1d..367bacd 100644 --- a/test/mvp/CollectibleV1.ts +++ b/test/mvp/CollectibleV1.ts @@ -68,10 +68,10 @@ describe("CollectibleV1", function () { }); it("normal user cannot burn", async () => { - const addresses = accounts.map(a => a.address); - for (let i = 0; i < addresses.length; i++) { - expect(await token.balanceOf(addresses[i])).to.equal("1"); - } + const a = accounts[0]; + await expect(token.connect(a).remoteBurn([0])).to.be.revertedWith( + "Ownable: caller is not the owner" + ); }); // it("fails with not enough allowance", async () => {