add SafeERC20 tests for succeeding operations

This commit is contained in:
Francisco Giordano
2017-08-28 17:47:48 -03:00
parent 7b463769a5
commit c37c233d22
2 changed files with 52 additions and 5 deletions

View File

@ -24,4 +24,15 @@ contract('SafeERC20', function () {
await this.helper.doFailingApprove().should.be.rejectedWith(EVMThrow);
});
it('should not throw on succeeding transfer', async function () {
await this.helper.doSucceedingTransfer().should.be.fulfilled;
});
it('should not throw on succeeding transferFrom', async function () {
await this.helper.doSucceedingTransferFrom().should.be.fulfilled;
});
it('should not throw on succeeding approve', async function () {
await this.helper.doSucceedingApprove().should.be.fulfilled;
});
});