Changed .eq to .equal. (#1231)
This commit is contained in:
committed by
Matt Condon
parent
d58fac8281
commit
48fe7b8cbf
@ -30,14 +30,14 @@ function shouldBehaveLikeBurnableToken (owner, initialBalance, [burner]) {
|
||||
|
||||
it('emits a burn event', async function () {
|
||||
const event = expectEvent.inLogs(this.logs, 'Burn');
|
||||
event.args.burner.should.eq(owner);
|
||||
event.args.burner.should.equal(owner);
|
||||
event.args.value.should.be.bignumber.equal(amount);
|
||||
});
|
||||
|
||||
it('emits a transfer event', async function () {
|
||||
const event = expectEvent.inLogs(this.logs, 'Transfer');
|
||||
event.args.from.should.eq(owner);
|
||||
event.args.to.should.eq(ZERO_ADDRESS);
|
||||
event.args.from.should.equal(owner);
|
||||
event.args.to.should.equal(ZERO_ADDRESS);
|
||||
event.args.value.should.be.bignumber.equal(amount);
|
||||
});
|
||||
}
|
||||
@ -81,14 +81,14 @@ function shouldBehaveLikeBurnableToken (owner, initialBalance, [burner]) {
|
||||
|
||||
it('emits a burn event', async function () {
|
||||
const event = expectEvent.inLogs(this.logs, 'Burn');
|
||||
event.args.burner.should.eq(owner);
|
||||
event.args.burner.should.equal(owner);
|
||||
event.args.value.should.be.bignumber.equal(amount);
|
||||
});
|
||||
|
||||
it('emits a transfer event', async function () {
|
||||
const event = expectEvent.inLogs(this.logs, 'Transfer');
|
||||
event.args.from.should.eq(owner);
|
||||
event.args.to.should.eq(ZERO_ADDRESS);
|
||||
event.args.from.should.equal(owner);
|
||||
event.args.to.should.equal(ZERO_ADDRESS);
|
||||
event.args.value.should.be.bignumber.equal(amount);
|
||||
});
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ function shouldBehaveLikeMintableToken (owner, minter, [anyone]) {
|
||||
const { logs } = await this.token.finishMinting({ from });
|
||||
|
||||
logs.length.should.be.equal(1);
|
||||
logs[0].event.should.eq('MintFinished');
|
||||
logs[0].event.should.equal('MintFinished');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -19,8 +19,8 @@ contract('PausableToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits a Pause event', async function () {
|
||||
const { logs } = await this.token.pause({ from });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Pause');
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Pause');
|
||||
});
|
||||
});
|
||||
|
||||
@ -61,8 +61,8 @@ contract('PausableToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits an Unpause event', async function () {
|
||||
const { logs } = await this.token.unpause({ from });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Unpause');
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Unpause');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -91,10 +91,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits an approval event', async function () {
|
||||
const { logs } = await this.token.approve(spender, amount, { from: owner });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Approval');
|
||||
logs[0].args.owner.should.eq(owner);
|
||||
logs[0].args.spender.should.eq(spender);
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Approval');
|
||||
logs[0].args.owner.should.equal(owner);
|
||||
logs[0].args.spender.should.equal(spender);
|
||||
logs[0].args.value.should.be.bignumber.equal(amount);
|
||||
});
|
||||
|
||||
@ -125,10 +125,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits an approval event', async function () {
|
||||
const { logs } = await this.token.approve(spender, amount, { from: owner });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Approval');
|
||||
logs[0].args.owner.should.eq(owner);
|
||||
logs[0].args.spender.should.eq(spender);
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Approval');
|
||||
logs[0].args.owner.should.equal(owner);
|
||||
logs[0].args.spender.should.equal(spender);
|
||||
logs[0].args.value.should.be.bignumber.equal(amount);
|
||||
});
|
||||
|
||||
@ -167,10 +167,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits an approval event', async function () {
|
||||
const { logs } = await this.token.approve(spender, amount, { from: owner });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Approval');
|
||||
logs[0].args.owner.should.eq(owner);
|
||||
logs[0].args.spender.should.eq(spender);
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Approval');
|
||||
logs[0].args.owner.should.equal(owner);
|
||||
logs[0].args.spender.should.equal(spender);
|
||||
logs[0].args.value.should.be.bignumber.equal(amount);
|
||||
});
|
||||
});
|
||||
@ -207,10 +207,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits a transfer event', async function () {
|
||||
const { logs } = await this.token.transferFrom(owner, to, amount, { from: spender });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Transfer');
|
||||
logs[0].args.from.should.eq(owner);
|
||||
logs[0].args.to.should.eq(to);
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Transfer');
|
||||
logs[0].args.from.should.equal(owner);
|
||||
logs[0].args.to.should.equal(to);
|
||||
logs[0].args.value.should.be.bignumber.equal(amount);
|
||||
});
|
||||
});
|
||||
@ -271,10 +271,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits an approval event', async function () {
|
||||
const { logs } = await this.token.decreaseApproval(spender, amount, { from: owner });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Approval');
|
||||
logs[0].args.owner.should.eq(owner);
|
||||
logs[0].args.spender.should.eq(spender);
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Approval');
|
||||
logs[0].args.owner.should.equal(owner);
|
||||
logs[0].args.spender.should.equal(spender);
|
||||
logs[0].args.value.should.be.bignumber.equal(0);
|
||||
});
|
||||
|
||||
@ -317,10 +317,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits an approval event', async function () {
|
||||
const { logs } = await this.token.decreaseApproval(spender, amount, { from: owner });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Approval');
|
||||
logs[0].args.owner.should.eq(owner);
|
||||
logs[0].args.spender.should.eq(spender);
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Approval');
|
||||
logs[0].args.owner.should.equal(owner);
|
||||
logs[0].args.spender.should.equal(spender);
|
||||
logs[0].args.value.should.be.bignumber.equal(0);
|
||||
});
|
||||
|
||||
@ -359,10 +359,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits an approval event', async function () {
|
||||
const { logs } = await this.token.decreaseApproval(spender, amount, { from: owner });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Approval');
|
||||
logs[0].args.owner.should.eq(owner);
|
||||
logs[0].args.spender.should.eq(spender);
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Approval');
|
||||
logs[0].args.owner.should.equal(owner);
|
||||
logs[0].args.spender.should.equal(spender);
|
||||
logs[0].args.value.should.be.bignumber.equal(0);
|
||||
});
|
||||
});
|
||||
@ -378,10 +378,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits an approval event', async function () {
|
||||
const { logs } = await this.token.increaseApproval(spender, amount, { from: owner });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Approval');
|
||||
logs[0].args.owner.should.eq(owner);
|
||||
logs[0].args.spender.should.eq(spender);
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Approval');
|
||||
logs[0].args.owner.should.equal(owner);
|
||||
logs[0].args.spender.should.equal(spender);
|
||||
logs[0].args.value.should.be.bignumber.equal(amount);
|
||||
});
|
||||
|
||||
@ -412,10 +412,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits an approval event', async function () {
|
||||
const { logs } = await this.token.increaseApproval(spender, amount, { from: owner });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Approval');
|
||||
logs[0].args.owner.should.eq(owner);
|
||||
logs[0].args.spender.should.eq(spender);
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Approval');
|
||||
logs[0].args.owner.should.equal(owner);
|
||||
logs[0].args.spender.should.equal(spender);
|
||||
logs[0].args.value.should.be.bignumber.equal(amount);
|
||||
});
|
||||
|
||||
@ -453,10 +453,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
|
||||
it('emits an approval event', async function () {
|
||||
const { logs } = await this.token.increaseApproval(spender, amount, { from: owner });
|
||||
|
||||
logs.length.should.eq(1);
|
||||
logs[0].event.should.eq('Approval');
|
||||
logs[0].args.owner.should.eq(owner);
|
||||
logs[0].args.spender.should.eq(spender);
|
||||
logs.length.should.equal(1);
|
||||
logs[0].event.should.equal('Approval');
|
||||
logs[0].args.owner.should.equal(owner);
|
||||
logs[0].args.spender.should.equal(spender);
|
||||
logs[0].args.value.should.be.bignumber.equal(amount);
|
||||
});
|
||||
});
|
||||
|
||||
@ -67,7 +67,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
|
||||
const block = await ethGetBlock(receipt.blockNumber);
|
||||
const releaseTime = block.timestamp;
|
||||
|
||||
(await this.token.balanceOf(beneficiary)).should.bignumber.eq(
|
||||
(await this.token.balanceOf(beneficiary)).should.bignumber.equal(
|
||||
amount.mul(releaseTime - this.start).div(this.duration).floor()
|
||||
);
|
||||
});
|
||||
@ -82,14 +82,14 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
|
||||
|
||||
await this.vesting.release(this.token.address);
|
||||
const expectedVesting = amount.mul(now - this.start).div(this.duration).floor();
|
||||
(await this.token.balanceOf(beneficiary)).should.bignumber.eq(expectedVesting);
|
||||
(await this.token.balanceOf(beneficiary)).should.bignumber.equal(expectedVesting);
|
||||
}
|
||||
});
|
||||
|
||||
it('should have released all after end', async function () {
|
||||
await increaseTimeTo(this.start + this.duration);
|
||||
await this.vesting.release(this.token.address);
|
||||
(await this.token.balanceOf(beneficiary)).should.bignumber.eq(amount);
|
||||
(await this.token.balanceOf(beneficiary)).should.bignumber.equal(amount);
|
||||
});
|
||||
|
||||
it('should be revoked by owner if revocable is set', async function () {
|
||||
@ -114,7 +114,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
|
||||
|
||||
await this.vesting.revoke(this.token.address, { from: owner });
|
||||
|
||||
(await this.token.balanceOf(owner)).should.bignumber.eq(amount.sub(vested));
|
||||
(await this.token.balanceOf(owner)).should.bignumber.equal(amount.sub(vested));
|
||||
});
|
||||
|
||||
it('should keep the vested tokens when revoked by owner', async function () {
|
||||
@ -126,7 +126,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
|
||||
|
||||
const vestedPost = await this.vesting.vestedAmount(this.token.address);
|
||||
|
||||
vestedPre.should.bignumber.eq(vestedPost);
|
||||
vestedPre.should.bignumber.equal(vestedPost);
|
||||
});
|
||||
|
||||
it('should fail to be revoked a second time', async function () {
|
||||
|
||||
@ -117,7 +117,7 @@ function shouldBehaveLikeERC721BasicToken (accounts) {
|
||||
|
||||
(await this.token.tokenOfOwnerByIndex(this.to, 0)).toNumber().should.be.equal(tokenId);
|
||||
|
||||
(await this.token.tokenOfOwnerByIndex(owner, 0)).toNumber().should.not.be.eq(tokenId);
|
||||
(await this.token.tokenOfOwnerByIndex(owner, 0)).toNumber().should.not.be.equal(tokenId);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user