Roles now emit events in construction and when renouncing. (#1329)
* release candidate v2.0.0-rc.1 * fix linter error (cherry picked from commitc12a1c6898) * Roles now emit events in construction and when renouncing. (cherry picked from commit21198bf1c1)
This commit is contained in:
committed by
Francisco Giordano
parent
dac5bccf80
commit
e7c99dd7dd
@ -89,6 +89,11 @@ function shouldBehaveLikePublicRole (authorized, otherAuthorized, [anyone], role
|
||||
(await this.contract[`is${rolename}`](authorized)).should.equal(false);
|
||||
});
|
||||
|
||||
it(`emits a ${rolename}Removed event`, async function () {
|
||||
const { logs } = await this.contract[`renounce${rolename}`]({ from: authorized });
|
||||
expectEvent.inLogs(logs, `${rolename}Removed`, { account: authorized });
|
||||
});
|
||||
|
||||
it('doesn\'t revert when renouncing unassigned role', async function () {
|
||||
await this.contract[`renounce${rolename}`]({ from: anyone });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user