From 0d73de1a69c574f6a4b5b2ef7ac5f4478d593660 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Wed, 25 Oct 2023 21:55:37 +0200 Subject: [PATCH] simplify --- test/access/AccessControl.behavior.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/access/AccessControl.behavior.js b/test/access/AccessControl.behavior.js index 9b960022a86..09b774c7464 100644 --- a/test/access/AccessControl.behavior.js +++ b/test/access/AccessControl.behavior.js @@ -173,17 +173,17 @@ function shouldBehaveLikeAccessControl() { }); it('do not revert if sender has role', async function () { - await this.mock.connect(this.authorized)['$_checkRole(bytes32)'](ROLE); + await this.mock.connect(this.authorized).$_checkRole(ROLE); }); it("revert if sender doesn't have role #1", async function () { - await expect(this.mock.connect(this.other)['$_checkRole(bytes32)'](ROLE)) + await expect(this.mock.connect(this.other).$_checkRole(ROLE)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') .withArgs(this.other.address, ROLE); }); it("revert if sender doesn't have role #2", async function () { - await expect(this.mock.connect(this.authorized)['$_checkRole(bytes32)'](OTHER_ROLE)) + await expect(this.mock.connect(this.authorized).$_checkRole(OTHER_ROLE)) .to.be.revertedWithCustomError(this.mock, 'AccessControlUnauthorizedAccount') .withArgs(this.authorized.address, OTHER_ROLE); });