Roles now emit events in construction and when renouncing. (#1329)
* release candidate v2.0.0-rc.1
* fix linter error
(cherry picked from commit c12a1c6898)
* Roles now emit events in construction and when renouncing.
This commit is contained in:
committed by
Francisco Giordano
parent
9b37104655
commit
21198bf1c1
@ -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