fixes #1404
This commit is contained in:
@ -60,7 +60,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
|
||||
expectEvent.inLogs(logs, 'Transfer', {
|
||||
from: owner,
|
||||
to: to,
|
||||
value: amount
|
||||
value: amount,
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -88,7 +88,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
|
||||
expectEvent.inLogs(logs, 'Approval', {
|
||||
owner: owner,
|
||||
spender: spender,
|
||||
value: amount
|
||||
value: amount,
|
||||
});
|
||||
});
|
||||
|
||||
@ -122,7 +122,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
|
||||
expectEvent.inLogs(logs, 'Approval', {
|
||||
owner: owner,
|
||||
spender: spender,
|
||||
value: amount
|
||||
value: amount,
|
||||
});
|
||||
});
|
||||
|
||||
@ -192,7 +192,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
|
||||
expectEvent.inLogs(logs, 'Transfer', {
|
||||
from: owner,
|
||||
to: to,
|
||||
value: amount
|
||||
value: amount,
|
||||
});
|
||||
});
|
||||
|
||||
@ -277,7 +277,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
|
||||
expectEvent.inLogs(logs, 'Approval', {
|
||||
owner: owner,
|
||||
spender: spender,
|
||||
value: 0
|
||||
value: 0,
|
||||
});
|
||||
});
|
||||
|
||||
@ -334,7 +334,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
|
||||
expectEvent.inLogs(logs, 'Approval', {
|
||||
owner: owner,
|
||||
spender: spender,
|
||||
value: amount
|
||||
value: amount,
|
||||
});
|
||||
});
|
||||
|
||||
@ -368,7 +368,7 @@ contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
|
||||
expectEvent.inLogs(logs, 'Approval', {
|
||||
owner: owner,
|
||||
spender: spender,
|
||||
value: amount
|
||||
value: amount,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -22,9 +22,17 @@ contract('SafeERC20', function () {
|
||||
await shouldFail.reverting(this.helper.doFailingApprove());
|
||||
});
|
||||
|
||||
it('reverts on increaseAllowance', async function () {
|
||||
await shouldFail.reverting(this.helper.doFailingIncreaseAllowance());
|
||||
});
|
||||
it('should throw on failed increaseAllowance', async function () {
|
||||
await shouldFail.reverting(this.helper.doFailingIncreaseAllowance());
|
||||
});
|
||||
|
||||
it('should throw on failed decreaseAllowance', async function () {
|
||||
await shouldFail.reverting(this.helper.doFailingDecreaseAllowance());
|
||||
});
|
||||
|
||||
it('should not throw on succeeding transfer', async function () {
|
||||
await this.helper.doSucceedingTransfer();
|
||||
});
|
||||
|
||||
it('reverts on decreaseAllowance', async function () {
|
||||
await shouldFail.reverting(this.helper.doFailingDecreaseAllowance());
|
||||
@ -90,4 +98,12 @@ contract('SafeERC20', function () {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should not throw on succeeding increaseAllowance', async function () {
|
||||
await this.helper.doSucceedingIncreaseAllowance();
|
||||
});
|
||||
|
||||
it('should not throw on succeeding decreaseAllowance', async function () {
|
||||
await this.helper.doSucceedingDecreaseAllowance();
|
||||
});
|
||||
});
|
||||
|
||||
@ -28,7 +28,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) {
|
||||
expectEvent.inLogs(this.logs, 'Transfer', {
|
||||
from: owner,
|
||||
to: ZERO_ADDRESS,
|
||||
value: amount
|
||||
value: amount,
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -74,7 +74,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) {
|
||||
expectEvent.inLogs(this.logs, 'Transfer', {
|
||||
from: owner,
|
||||
to: ZERO_ADDRESS,
|
||||
value: amount
|
||||
value: amount,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ function shouldBehaveLikeERC20Mintable (minter, [anyone]) {
|
||||
expectEvent.inLogs(this.logs, 'Transfer', {
|
||||
from: ZERO_ADDRESS,
|
||||
to: anyone,
|
||||
value: amount
|
||||
value: amount,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ function shouldBehaveLikeERC721 (
|
||||
expectEvent.inLogs(logs, 'Transfer', {
|
||||
from: owner,
|
||||
to: this.toWhom,
|
||||
tokenId: tokenId
|
||||
tokenId: tokenId,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
@ -95,7 +95,7 @@ function shouldBehaveLikeERC721 (
|
||||
expectEvent.inLogs(logs, 'Transfer', {
|
||||
from: owner,
|
||||
to: this.toWhom,
|
||||
tokenId: tokenId
|
||||
tokenId: tokenId,
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -160,7 +160,7 @@ function shouldBehaveLikeERC721 (
|
||||
expectEvent.inLogs(logs, 'Transfer', {
|
||||
from: owner,
|
||||
to: owner,
|
||||
tokenId: tokenId
|
||||
tokenId: tokenId,
|
||||
});
|
||||
});
|
||||
|
||||
@ -336,7 +336,7 @@ function shouldBehaveLikeERC721 (
|
||||
expectEvent.inLogs(logs, 'Approval', {
|
||||
owner: owner,
|
||||
approved: address,
|
||||
tokenId: tokenId
|
||||
tokenId: tokenId,
|
||||
});
|
||||
});
|
||||
};
|
||||
@ -446,7 +446,7 @@ function shouldBehaveLikeERC721 (
|
||||
expectEvent.inLogs(logs, 'ApprovalForAll', {
|
||||
owner: owner,
|
||||
operator: operator,
|
||||
approved: true
|
||||
approved: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -468,7 +468,7 @@ function shouldBehaveLikeERC721 (
|
||||
expectEvent.inLogs(logs, 'ApprovalForAll', {
|
||||
owner: owner,
|
||||
operator: operator,
|
||||
approved: true
|
||||
approved: true,
|
||||
});
|
||||
});
|
||||
|
||||
@ -496,7 +496,7 @@ function shouldBehaveLikeERC721 (
|
||||
expectEvent.inLogs(logs, 'ApprovalForAll', {
|
||||
owner: owner,
|
||||
operator: operator,
|
||||
approved: true
|
||||
approved: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -41,7 +41,7 @@ function shouldBehaveLikeMintAndBurnERC721 (
|
||||
expectEvent.inLogs(logs, 'Transfer', {
|
||||
from: ZERO_ADDRESS,
|
||||
to: newOwner,
|
||||
tokenId: thirdTokenId
|
||||
tokenId: thirdTokenId,
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -86,7 +86,7 @@ function shouldBehaveLikeMintAndBurnERC721 (
|
||||
expectEvent.inLogs(logs, 'Transfer', {
|
||||
from: owner,
|
||||
to: ZERO_ADDRESS,
|
||||
tokenId: tokenId
|
||||
tokenId: tokenId,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user