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
fix old function names
  • Loading branch information
frangio committed Sep 7, 2018
commit 267c384c9e22d1be0feea4357d1eb603de0e9567
12 changes: 6 additions & 6 deletions test/token/ERC20/ERC20Pausable.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ contract('ERC20Pausable', function ([_, owner, recipient, anotherAccount]) {
});

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

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

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

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

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

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

Expand All @@ -212,7 +212,7 @@ contract('ERC20Pausable', function ([_, owner, recipient, anotherAccount]) {
});

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

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

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

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

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

await assertRevert(this.token.increaseApproval(anotherAccount, 40, { from: owner }));
await assertRevert(this.token.increaseAllowance(anotherAccount, 40, { from: owner }));
});
});
});
Expand Down