Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('rejects a null account', async function () {
await shouldFail.reverting(this.token.burn(ZERO_ADDRESS, 1));
});
it('reverts', async function () {
await shouldFail.reverting(this.token.burn(amount, { from: owner }));
});
});
it('reverts when trying to increase approval when paused', async function () {
await this.token.pause({ from: pauser });
await shouldFail.reverting(this.token.increaseAllowance(anotherAccount, 40, { from: pauser }));
});
});
it('rejects a null account', async function () {
await shouldFail.reverting(this.token.mint(ZERO_ADDRESS, amount));
});
it('reverts when trying to transfer when paused', async function () {
await this.token.pause({ from: pauser });
await shouldFail.reverting(this.token.transfer(recipient, 100, { from: pauser }));
});
});
it('reverts when trying to transfer when paused', async function () {
await this.token.pause({ from: pauser });
await shouldFail.reverting(this.token.approve(anotherAccount, 40, { from: pauser }));
});
});
it('reverts when trying to transfer from when paused', async function () {
await this.token.pause({ from: pauser });
await shouldFail.reverting(this.token.transferFrom(pauser, recipient, 40, { from: anotherAccount }));
});
});
it('rejects burning more than allowance', async function () {
await shouldFail.reverting(this.token.burnFrom(owner, allowance.plus(1)));
});
it('reverts', async function () {
await this.token.approve(burner, amount - 1, { from: owner });
await shouldFail.reverting(this.token.burnFrom(owner, amount, { from: burner }));
});
});
it('reverts', async function () {
await shouldFail.reverting(this.token.transfer(to, 100, { from: owner }));
});
});