Skip to content

Commit 180ed89

Browse files
committed
Changed equal(bool) to .to.be.bool
1 parent f8997ca commit 180ed89

File tree

5 files changed

+23
-25
lines changed

5 files changed

+23
-25
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[![NPM Package](https://img.shields.io/npm/v/openzeppelin-solidity.svg?style=flat-square)](https://www.npmjs.org/package/openzeppelin-solidity)
2-
31
# OpenZeppelin Solidity
42
[![NPM Package](https://img.shields.io/npm/v/openzeppelin-solidity.svg?style=flat-square)](https://www.npmjs.org/package/openzeppelin-solidity)
53
[![Build Status](https://img.shields.io/travis/OpenZeppelin/openzeppelin-solidity.svg?branch=master&style=flat-square)](https://travis-ci.org/OpenZeppelin/openzeppelin-solidity)

test/Bounty.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ contract('Bounty', function ([_, owner, researcher, nonTarget]) {
6666
await this.bounty.claim(this.targetAddress, { from: researcher });
6767
const claim = await this.bounty.claimed();
6868

69-
claim.should.equal(true);
69+
claim.should.be.true;
7070

7171
const researcherPrevBalance = await ethGetBalance(researcher);
7272

test/access/SignatureBouncer.test.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ contract('Bouncer', ([_, owner, anyone, bouncerAddress, authorizedUser]) => {
2626

2727
it('allows the owner to add a bouncer', async function () {
2828
await this.bouncer.addBouncer(bouncerAddress, { from: owner });
29-
(await this.bouncer.hasRole(bouncerAddress, this.roleBouncer)).should.equal(true);
29+
(await this.bouncer.hasRole(bouncerAddress, this.roleBouncer)).should.be.true;
3030
});
3131

3232
it('does not allow adding an invalid address', async function () {
@@ -39,7 +39,7 @@ contract('Bouncer', ([_, owner, anyone, bouncerAddress, authorizedUser]) => {
3939
await this.bouncer.addBouncer(bouncerAddress, { from: owner });
4040

4141
await this.bouncer.removeBouncer(bouncerAddress, { from: owner });
42-
(await this.bouncer.hasRole(bouncerAddress, this.roleBouncer)).should.equal(false);
42+
(await this.bouncer.hasRole(bouncerAddress, this.roleBouncer)).should.be.false;
4343
});
4444

4545
it('does not allow anyone to add a bouncer', async function () {
@@ -168,77 +168,77 @@ contract('Bouncer', ([_, owner, anyone, bouncerAddress, authorizedUser]) => {
168168
context('signature validation', () => {
169169
context('plain signature', () => {
170170
it('validates valid signature for valid user', async function () {
171-
(await this.bouncer.checkValidSignature(authorizedUser, this.signFor(authorizedUser))).should.equal(true);
171+
(await this.bouncer.checkValidSignature(authorizedUser, this.signFor(authorizedUser))).should.be.true;
172172
});
173173

174174
it('does not validate invalid signature for valid user', async function () {
175-
(await this.bouncer.checkValidSignature(authorizedUser, INVALID_SIGNATURE)).should.equal(false);
175+
(await this.bouncer.checkValidSignature(authorizedUser, INVALID_SIGNATURE)).should.be.false;
176176
});
177177

178178
it('does not validate valid signature for anyone', async function () {
179-
(await this.bouncer.checkValidSignature(anyone, this.signFor(authorizedUser))).should.equal(false);
179+
(await this.bouncer.checkValidSignature(anyone, this.signFor(authorizedUser))).should.be.false;
180180
});
181181

182182
it('does not validate valid signature for method for valid user', async function () {
183183
(await this.bouncer.checkValidSignature(authorizedUser, this.signFor(authorizedUser, 'checkValidSignature'))
184-
).should.equal(false);
184+
).should.be.false;
185185
});
186186
});
187187

188188
context('method signature', () => {
189189
it('validates valid signature with correct method for valid user', async function () {
190190
(await this.bouncer.checkValidSignatureAndMethod(authorizedUser,
191191
this.signFor(authorizedUser, 'checkValidSignatureAndMethod'))
192-
).should.equal(true);
192+
).should.be.true;
193193
});
194194

195195
it('does not validate invalid signature with correct method for valid user', async function () {
196-
(await this.bouncer.checkValidSignatureAndMethod(authorizedUser, INVALID_SIGNATURE)).should.equal(false);
196+
(await this.bouncer.checkValidSignatureAndMethod(authorizedUser, INVALID_SIGNATURE)).should.be.false;
197197
});
198198

199199
it('does not validate valid signature with correct method for anyone', async function () {
200200
(await this.bouncer.checkValidSignatureAndMethod(anyone,
201201
this.signFor(authorizedUser, 'checkValidSignatureAndMethod'))
202-
).should.equal(false);
202+
).should.be.false;
203203
});
204204

205205
it('does not validate valid non-method signature with correct method for valid user', async function () {
206206
(await this.bouncer.checkValidSignatureAndMethod(authorizedUser, this.signFor(authorizedUser))
207-
).should.equal(false);
207+
).should.be.false;
208208
});
209209
});
210210

211211
context('method and data signature', () => {
212212
it('validates valid signature with correct method and data for valid user', async function () {
213213
(await this.bouncer.checkValidSignatureAndData(authorizedUser, BYTES_VALUE, UINT_VALUE,
214214
this.signFor(authorizedUser, 'checkValidSignatureAndData', [authorizedUser, BYTES_VALUE, UINT_VALUE]))
215-
).should.equal(true);
215+
).should.be.true;
216216
});
217217

218218
it('does not validate invalid signature with correct method and data for valid user', async function () {
219219
(await this.bouncer.checkValidSignatureAndData(authorizedUser, BYTES_VALUE, UINT_VALUE, INVALID_SIGNATURE)
220-
).should.equal(false);
220+
).should.be.false;
221221
});
222222

223223
it('does not validate valid signature with correct method and incorrect data for valid user',
224224
async function () {
225225
(await this.bouncer.checkValidSignatureAndData(authorizedUser, BYTES_VALUE, UINT_VALUE + 10,
226226
this.signFor(authorizedUser, 'checkValidSignatureAndData', [authorizedUser, BYTES_VALUE, UINT_VALUE]))
227-
).should.equal(false);
227+
).should.be.false;
228228
}
229229
);
230230

231231
it('does not validate valid signature with correct method and data for anyone', async function () {
232232
(await this.bouncer.checkValidSignatureAndData(anyone, BYTES_VALUE, UINT_VALUE,
233233
this.signFor(authorizedUser, 'checkValidSignatureAndData', [authorizedUser, BYTES_VALUE, UINT_VALUE]))
234-
).should.equal(false);
234+
).should.be.false;
235235
});
236236

237237
it('does not validate valid non-method-data signature with correct method and data for valid user',
238238
async function () {
239239
(await this.bouncer.checkValidSignatureAndData(authorizedUser, BYTES_VALUE, UINT_VALUE,
240240
this.signFor(authorizedUser, 'checkValidSignatureAndData'))
241-
).should.equal(false);
241+
).should.be.false;
242242
}
243243
);
244244
});

test/ownership/Superuser.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ contract('Superuser', function ([_, firstOwner, newSuperuser, newOwner, anyone])
1515

1616
context('in normal conditions', () => {
1717
it('should set the owner as the default superuser', async function () {
18-
(await this.superuser.isSuperuser(firstOwner)).should.be.be.true;
18+
(await this.superuser.isSuperuser(firstOwner)).should.be.true;
1919
});
2020

2121
it('should change superuser after transferring', async function () {
2222
await this.superuser.transferSuperuser(newSuperuser, { from: firstOwner });
2323

24-
(await this.superuser.isSuperuser(firstOwner)).should.be.be.false;
24+
(await this.superuser.isSuperuser(firstOwner)).should.be.false;
2525

26-
(await this.superuser.isSuperuser(newSuperuser)).should.be.be.true;
26+
(await this.superuser.isSuperuser(newSuperuser)).should.be.true;
2727
});
2828

2929
it('should prevent changing to a null superuser', async function () {

test/ownership/Whitelist.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ contract('Whitelist', function ([_, owner, whitelistedAddress1, whitelistedAddre
2121
'RoleAdded',
2222
{ role: this.role },
2323
);
24-
(await this.mock.whitelist(whitelistedAddress1)).should.be.be.true;
24+
(await this.mock.whitelist(whitelistedAddress1)).should.be.true;
2525
});
2626

2727
it('should add addresses to the whitelist', async function () {
@@ -31,7 +31,7 @@ contract('Whitelist', function ([_, owner, whitelistedAddress1, whitelistedAddre
3131
{ role: this.role },
3232
);
3333
for (const addr of whitelistedAddresses) {
34-
(await this.mock.whitelist(addr)).should.be.be.true;
34+
(await this.mock.whitelist(addr)).should.be.true;
3535
}
3636
});
3737

@@ -41,7 +41,7 @@ contract('Whitelist', function ([_, owner, whitelistedAddress1, whitelistedAddre
4141
'RoleRemoved',
4242
{ role: this.role },
4343
);
44-
(await this.mock.whitelist(whitelistedAddress1)).should.be.be.false;
44+
(await this.mock.whitelist(whitelistedAddress1)).should.be.false;
4545
});
4646

4747
it('should remove addresses from the the whitelist', async function () {
@@ -51,7 +51,7 @@ contract('Whitelist', function ([_, owner, whitelistedAddress1, whitelistedAddre
5151
{ role: this.role },
5252
);
5353
for (const addr of whitelistedAddresses) {
54-
(await this.mock.whitelist(addr)).should.be.be.false;
54+
(await this.mock.whitelist(addr)).should.be.false;
5555
}
5656
});
5757

0 commit comments

Comments
 (0)