Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into fix-increase-decrease-allowance
  • Loading branch information
frangio authored Sep 7, 2018
commit 5d87d9a6fb19e421f5ee4b77ee3018e3999c2264
12 changes: 6 additions & 6 deletions test/token/ERC20/ERC20Pausable.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ contract('ERC20Pausable', function ([_, pauser, otherPauser, recipient, anotherA
});

it('allows to decrease approval when unpaused', async function () {
await this.token.decreaseAllowance(anotherAccount, 40, { from: owner });
await this.token.decreaseAllowance(anotherAccount, 40, { from: pauser });

(await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(60);
});
Expand All @@ -205,15 +205,15 @@ contract('ERC20Pausable', function ([_, pauser, otherPauser, recipient, anotherA
await this.token.pause({ from: pauser });
await this.token.unpause({ from: pauser });

await this.token.decreaseAllowance(anotherAccount, 40, { from: owner });
await this.token.decreaseAllowance(anotherAccount, 40, { from: pauser });

(await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(60);
});

it('reverts when trying to transfer when paused', async function () {
await this.token.pause({ from: pauser });

await assertRevert(this.token.decreaseAllowance(anotherAccount, 40, { from: owner }));
await assertRevert(this.token.decreaseAllowance(anotherAccount, 40, { from: pauser }));
});
});

Expand All @@ -223,7 +223,7 @@ contract('ERC20Pausable', function ([_, pauser, otherPauser, recipient, anotherA
});

it('allows to increase approval when unpaused', async function () {
await this.token.increaseAllowance(anotherAccount, 40, { from: owner });
await this.token.increaseAllowannce(anotherAccount, 40, { from: pauser });

(await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(140);
});
Expand All @@ -232,15 +232,15 @@ contract('ERC20Pausable', function ([_, pauser, otherPauser, recipient, anotherA
await this.token.pause({ from: pauser });
await this.token.unpause({ from: pauser });

await this.token.increaseAllowance(anotherAccount, 40, { from: owner });
await this.token.increaseAllowance(anotherAccount, 40, { from: pauser });

(await this.token.allowance(pauser, anotherAccount)).should.be.bignumber.equal(140);
});

it('reverts when trying to increase approval when paused', async function () {
await this.token.pause({ from: pauser });

await assertRevert(this.token.increaseAllowance(anotherAccount, 40, { from: owner }));
await assertRevert(this.token.increaseAllowance(anotherAccount, 40, { from: pauser }));
});
});
});
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.