Fix AccessControlEnumerable not tracking renounceRole (#2572)
* Fix AccessControlEnumerable not tracking renounceRole
* Updated changelog
(cherry picked from commit 7adf0d88a0)
This commit is contained in:
committed by
Hadrien Croubois
parent
6505e28c40
commit
b1e0aa487d
@ -179,6 +179,13 @@ function shouldBehaveLikeAccessControlEnumerable (errorPrefix, admin, authorized
|
||||
|
||||
expect(bearers).to.have.members([authorized, otherAuthorized]);
|
||||
});
|
||||
it('role enumeration should be in sync after renounceRole call', async function () {
|
||||
expect(await this.accessControl.getRoleMemberCount(ROLE)).to.bignumber.equal('0');
|
||||
await this.accessControl.grantRole(ROLE, admin, { from: admin });
|
||||
expect(await this.accessControl.getRoleMemberCount(ROLE)).to.bignumber.equal('1');
|
||||
await this.accessControl.renounceRole(ROLE, admin, { from: admin });
|
||||
expect(await this.accessControl.getRoleMemberCount(ROLE)).to.bignumber.equal('0');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user