Minor test style improvements (#1219)
* Changed .eq to .equal * Changed equal(bool) to .to.be.bool * Changed be.bool to equal(bool), disallowed unused expressions.
This commit is contained in:
@ -20,7 +20,7 @@ function shouldBehaveLikeMintableToken (owner, minter, [anyone]) {
|
||||
describe('minting finished', function () {
|
||||
describe('when the token minting is not finished', function () {
|
||||
it('returns false', async function () {
|
||||
(await this.token.mintingFinished()).should.be.false;
|
||||
(await this.token.mintingFinished()).should.equal(false);
|
||||
});
|
||||
});
|
||||
|
||||
@ -30,7 +30,7 @@ function shouldBehaveLikeMintableToken (owner, minter, [anyone]) {
|
||||
});
|
||||
|
||||
it('returns true', async function () {
|
||||
(await this.token.mintingFinished()).should.be.true;
|
||||
(await this.token.mintingFinished()).should.equal(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -43,7 +43,7 @@ function shouldBehaveLikeMintableToken (owner, minter, [anyone]) {
|
||||
it('finishes token minting', async function () {
|
||||
await this.token.finishMinting({ from });
|
||||
|
||||
(await this.token.mintingFinished()).should.be.true;
|
||||
(await this.token.mintingFinished()).should.equal(true);
|
||||
});
|
||||
|
||||
it('emits a mint finished event', async function () {
|
||||
|
||||
@ -13,7 +13,7 @@ contract('PausableToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
describe('when the token is unpaused', function () {
|
||||
it('pauses the token', async function () {
|
||||
await this.token.pause({ from });
|
||||
(await this.token.paused()).should.be.true;
|
||||
(await this.token.paused()).should.equal(true);
|
||||
});
|
||||
|
||||
it('emits a Pause event', async function () {
|
||||
@ -55,7 +55,7 @@ contract('PausableToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
|
||||
it('unpauses the token', async function () {
|
||||
await this.token.unpause({ from });
|
||||
(await this.token.paused()).should.be.false;
|
||||
(await this.token.paused()).should.equal(false);
|
||||
});
|
||||
|
||||
it('emits an Unpause event', async function () {
|
||||
@ -87,18 +87,18 @@ contract('PausableToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
|
||||
describe('paused', function () {
|
||||
it('is not paused by default', async function () {
|
||||
(await this.token.paused({ from })).should.be.false;
|
||||
(await this.token.paused({ from })).should.equal(false);
|
||||
});
|
||||
|
||||
it('is paused after being paused', async function () {
|
||||
await this.token.pause({ from });
|
||||
(await this.token.paused({ from })).should.be.true;
|
||||
(await this.token.paused({ from })).should.equal(true);
|
||||
});
|
||||
|
||||
it('is not paused after being paused and then unpaused', async function () {
|
||||
await this.token.pause({ from });
|
||||
await this.token.unpause({ from });
|
||||
(await this.token.paused()).should.be.false;
|
||||
(await this.token.paused()).should.equal(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -6,10 +6,10 @@ function shouldBehaveLikeRBACMintableToken (owner, [anyone]) {
|
||||
describe('handle roles', function () {
|
||||
it('owner can add and remove a minter role', async function () {
|
||||
await this.token.addMinter(anyone, { from: owner });
|
||||
(await this.token.hasRole(anyone, ROLE_MINTER)).should.be.true;
|
||||
(await this.token.hasRole(anyone, ROLE_MINTER)).should.equal(true);
|
||||
|
||||
await this.token.removeMinter(anyone, { from: owner });
|
||||
(await this.token.hasRole(anyone, ROLE_MINTER)).should.be.false;
|
||||
(await this.token.hasRole(anyone, ROLE_MINTER)).should.equal(false);
|
||||
});
|
||||
|
||||
it('anyone can\'t add or remove a minter role', async function () {
|
||||
|
||||
Reference in New Issue
Block a user