Replace chai.should with chai.expect (#1780)

* changed exxpect to expect wherever applicable

* Merged with latest branch

* Updated merkleTree helper to latest master branch

* Made linting fixes

* Fix for test build

* updated for Coverage

* Updated Address.test.js

* Undo package-lock changes.
This commit is contained in:
Yohann Pereira
2019-06-24 16:40:05 -04:00
committed by Francisco Giordano
parent 852e11c2db
commit 489d2e85f1
57 changed files with 564 additions and 453 deletions

View File

@ -1,6 +1,8 @@
const { expectRevert, constants } = require('openzeppelin-test-helpers');
const { ZERO_ADDRESS } = constants;
const { expect } = require('chai');
const RolesMock = artifacts.require('RolesMock');
contract('Roles', function ([_, authorized, otherAuthorized, other]) {
@ -14,16 +16,16 @@ contract('Roles', function ([_, authorized, otherAuthorized, other]) {
context('initially', function () {
it('doesn\'t pre-assign roles', async function () {
(await this.roles.has(authorized)).should.equal(false);
(await this.roles.has(otherAuthorized)).should.equal(false);
(await this.roles.has(other)).should.equal(false);
expect(await this.roles.has(authorized)).to.equal(false);
expect(await this.roles.has(otherAuthorized)).to.equal(false);
expect(await this.roles.has(other)).to.equal(false);
});
describe('adding roles', function () {
it('adds roles to a single account', async function () {
await this.roles.add(authorized);
(await this.roles.has(authorized)).should.equal(true);
(await this.roles.has(other)).should.equal(false);
expect(await this.roles.has(authorized)).to.equal(true);
expect(await this.roles.has(other)).to.equal(false);
});
it('reverts when adding roles to an already assigned account', async function () {
@ -46,8 +48,8 @@ contract('Roles', function ([_, authorized, otherAuthorized, other]) {
describe('removing roles', function () {
it('removes a single role', async function () {
await this.roles.remove(authorized);
(await this.roles.has(authorized)).should.equal(false);
(await this.roles.has(otherAuthorized)).should.equal(true);
expect(await this.roles.has(authorized)).to.equal(false);
expect(await this.roles.has(otherAuthorized)).to.equal(true);
});
it('reverts when removing unassigned roles', async function () {