Skip to content

Commit

Permalink
Add test for usdt / 0 value.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Ignacio Ubeira committed Jul 30, 2024
1 parent ead7ac7 commit c3c4388
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/token/ERC20/utils/SafeERC20.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ describe('SafeERC20', function () {
await this.mock.$forceApprove(this.token, this.spender, 200n);
expect(await this.token.allowance(this.mock, this.spender)).to.equal(200n);
});

it('forceApprove works for zero allowance', async function () {
await this.mock.$forceApprove(this.token, this.spender, 0);
expect(await this.token.allowance(this.mock, this.spender)).to.equal(0);
});
});
});

Expand Down

0 comments on commit c3c4388

Please sign in to comment.