Removing more asserts in favor of require (#834)
* Removed asserts and replaced them in favor of require * Adapted tests to work with requires
This commit is contained in:
committed by
Francisco Giordano
parent
7e44204d9b
commit
85f079ee89
@ -1,4 +1,4 @@
|
||||
import EVMThrow from '../../helpers/EVMThrow';
|
||||
import EVMRevert from '../../helpers/EVMRevert';
|
||||
|
||||
require('chai')
|
||||
.use(require('chai-as-promised'))
|
||||
@ -12,15 +12,15 @@ contract('SafeERC20', function () {
|
||||
});
|
||||
|
||||
it('should throw on failed transfer', async function () {
|
||||
await this.helper.doFailingTransfer().should.be.rejectedWith(EVMThrow);
|
||||
await this.helper.doFailingTransfer().should.be.rejectedWith(EVMRevert);
|
||||
});
|
||||
|
||||
it('should throw on failed transferFrom', async function () {
|
||||
await this.helper.doFailingTransferFrom().should.be.rejectedWith(EVMThrow);
|
||||
await this.helper.doFailingTransferFrom().should.be.rejectedWith(EVMRevert);
|
||||
});
|
||||
|
||||
it('should throw on failed approve', async function () {
|
||||
await this.helper.doFailingApprove().should.be.rejectedWith(EVMThrow);
|
||||
await this.helper.doFailingApprove().should.be.rejectedWith(EVMRevert);
|
||||
});
|
||||
|
||||
it('should not throw on succeeding transfer', async function () {
|
||||
|
||||
Reference in New Issue
Block a user