Update Test Helpers to 0.5.6 (#2261)

* update test-helpers to 0.5.6-rc.0

* remove comment that no longer applies

* fix uses of expectEvent.notEmitted

* remove mocha only

* update to final version

* Update test/token/ERC777/ERC777.test.js

Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>

Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
This commit is contained in:
Francisco Giordano
2020-06-02 17:00:56 -03:00
committed by GitHub
parent 91516b2318
commit ccfd370b89
4 changed files with 25 additions and 13 deletions

View File

@ -49,7 +49,7 @@ describe('AccessControl', function () {
it('accounts can be granted a role multiple times', async function () {
await this.accessControl.grantRole(ROLE, authorized, { from: admin });
const receipt = await this.accessControl.grantRole(ROLE, authorized, { from: admin });
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleGranted');
expectEvent.notEmitted(receipt, 'RoleGranted');
});
});
@ -58,7 +58,7 @@ describe('AccessControl', function () {
expect(await this.accessControl.hasRole(ROLE, authorized)).to.equal(false);
const receipt = await this.accessControl.revokeRole(ROLE, authorized, { from: admin });
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
expectEvent.notEmitted(receipt, 'RoleRevoked');
});
context('with granted role', function () {
@ -84,7 +84,7 @@ describe('AccessControl', function () {
await this.accessControl.revokeRole(ROLE, authorized, { from: admin });
const receipt = await this.accessControl.revokeRole(ROLE, authorized, { from: admin });
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
expectEvent.notEmitted(receipt, 'RoleRevoked');
});
});
});
@ -92,7 +92,7 @@ describe('AccessControl', function () {
describe('renouncing', function () {
it('roles that are not had can be renounced', async function () {
const receipt = await this.accessControl.renounceRole(ROLE, authorized, { from: authorized });
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
expectEvent.notEmitted(receipt, 'RoleRevoked');
});
context('with granted role', function () {
@ -118,7 +118,7 @@ describe('AccessControl', function () {
await this.accessControl.renounceRole(ROLE, authorized, { from: authorized });
const receipt = await this.accessControl.renounceRole(ROLE, authorized, { from: authorized });
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
expectEvent.notEmitted(receipt, 'RoleRevoked');
});
});
});