Add test for usdt / 0 value.

pull/5134/head
Juan Ignacio Ubeira 6 months ago
parent ead7ac758b
commit c3c4388f36
  1. 5
      test/token/ERC20/utils/SafeERC20.test.js

@ -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);
});
});
});

Loading…
Cancel
Save