Feature/Adding RoleAdminChanged event in AccessControl (#2214)
* Emit new event RoleAdminChanged * Adding new RoleAdminChanged event in Tests * Update suggested comments on new Event Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com> * Adding PreviousAdminRole to event * Update AccessControl.test.js * Update CHANGELOG.md Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
This commit is contained in:
committed by
GitHub
parent
78dc37739f
commit
73baf0b635
@ -142,7 +142,13 @@ describe('AccessControl', function () {
|
||||
|
||||
describe('setting role admin', function () {
|
||||
beforeEach(async function () {
|
||||
await this.accessControl.setRoleAdmin(ROLE, OTHER_ROLE);
|
||||
const receipt = await this.accessControl.setRoleAdmin(ROLE, OTHER_ROLE);
|
||||
expectEvent(receipt, 'RoleAdminChanged', {
|
||||
role: ROLE,
|
||||
previousAdminRole: DEFAULT_ADMIN_ROLE,
|
||||
newAdminRole: OTHER_ROLE
|
||||
});
|
||||
|
||||
await this.accessControl.grantRole(OTHER_ROLE, otherAdmin, { from: admin });
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user