Skip to content

Commit

Permalink
Uncomment expectEvent.not tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nventuro committed Mar 12, 2020
1 parent 37d4adf commit 71f8da2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@openzeppelin/gsn-helpers": "^0.2.3",
"@openzeppelin/gsn-provider": "^0.1.9",
"@openzeppelin/test-environment": "^0.1.3",
"@openzeppelin/test-helpers": "^0.5.4",
"@openzeppelin/test-helpers": "^0.5.5",
"chai": "^4.2.0",
"eslint": "^6.5.1",
"eslint-config-standard": "^14.1.0",
Expand Down
10 changes: 5 additions & 5 deletions test/access/AccessControl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleGranted');
});
});

Expand All @@ -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');
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
});

context('with granted role', function () {
Expand All @@ -84,15 +84,15 @@ 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');
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
});
});
});

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');
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
});

context('with granted role', function () {
Expand All @@ -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');
await expectEvent.not.inTransaction(receipt.tx, AccessControlMock, 'RoleRevoked');
});
});
});
Expand Down

0 comments on commit 71f8da2

Please sign in to comment.