removed unnecessary require and renaming of null to zero (#1717)
* removed unnecessary require * build pipeline fix * kept as it is * Added require
This commit is contained in:
committed by
Nicolás Venturo
parent
bbe0eefd9f
commit
963f1eb35b
@ -323,11 +323,11 @@ contract('ERC20', function ([_, initialHolder, recipient, anotherAccount]) {
|
||||
describe('_mint', function () {
|
||||
const amount = new BN(50);
|
||||
|
||||
it('rejects a null account', async function () {
|
||||
it('rejects a zero account', async function () {
|
||||
await shouldFail.reverting(this.token.mint(ZERO_ADDRESS, amount));
|
||||
});
|
||||
|
||||
describe('for a non null account', function () {
|
||||
describe('for a non zero account', function () {
|
||||
beforeEach('minting', async function () {
|
||||
const { logs } = await this.token.mint(recipient, amount);
|
||||
this.logs = logs;
|
||||
@ -354,11 +354,11 @@ contract('ERC20', function ([_, initialHolder, recipient, anotherAccount]) {
|
||||
});
|
||||
|
||||
describe('_burn', function () {
|
||||
it('rejects a null account', async function () {
|
||||
it('rejects a zero account', async function () {
|
||||
await shouldFail.reverting(this.token.burn(ZERO_ADDRESS, new BN(1)));
|
||||
});
|
||||
|
||||
describe('for a non null account', function () {
|
||||
describe('for a non zero account', function () {
|
||||
it('rejects burning more than balance', async function () {
|
||||
await shouldFail.reverting(this.token.burn(initialHolder, initialSupply.addn(1)));
|
||||
});
|
||||
@ -405,11 +405,11 @@ contract('ERC20', function ([_, initialHolder, recipient, anotherAccount]) {
|
||||
await this.token.approve(spender, allowance, { from: initialHolder });
|
||||
});
|
||||
|
||||
it('rejects a null account', async function () {
|
||||
it('rejects a zero account', async function () {
|
||||
await shouldFail.reverting(this.token.burnFrom(ZERO_ADDRESS, new BN(1)));
|
||||
});
|
||||
|
||||
describe('for a non null account', function () {
|
||||
describe('for a non zero account', function () {
|
||||
it('rejects burning more than allowance', async function () {
|
||||
await shouldFail.reverting(this.token.burnFrom(initialHolder, allowance.addn(1)));
|
||||
});
|
||||
|
||||
@ -15,7 +15,7 @@ contract('ERC721', function ([_, creator, tokenOwner, other, ...accounts]) {
|
||||
const tokenId = new BN('5042');
|
||||
|
||||
describe('_mint(address, uint256)', function () {
|
||||
it('reverts with a null destination address', async function () {
|
||||
it('reverts with a zero destination address', async function () {
|
||||
await shouldFail.reverting(this.token.mint(ZERO_ADDRESS, tokenId));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user