How to use the openzeppelin-solidity/test/helpers/shouldFail.reverting function in openzeppelin-solidity

To help you get started, we’ve selected a few openzeppelin-solidity examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github etoroxlabs / eToken / test / token / ERC20 / behaviors / ERC20.internal.behavior.js View on Github external
it('rejects a null account', async function () {
      await shouldFail.reverting(this.token.burn(ZERO_ADDRESS, 1));
    });
github etoroxlabs / eToken / test / token / ERC20 / behaviors / ERC20Burnable.behavior.js View on Github external
it('reverts', async function () {
        await shouldFail.reverting(this.token.burn(amount, { from: owner }));
      });
    });
github etoroxlabs / eToken / test / token / ERC20 / behaviors / ERC20Pausable.behavior.js View on Github external
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 }));
      });
    });
github etoroxlabs / eToken / test / token / ERC20 / behaviors / ERC20.internal.behavior.js View on Github external
it('rejects a null account', async function () {
      await shouldFail.reverting(this.token.mint(ZERO_ADDRESS, amount));
    });
github etoroxlabs / eToken / test / token / ERC20 / behaviors / ERC20Pausable.behavior.js View on Github external
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 }));
      });
    });
github etoroxlabs / eToken / test / token / ERC20 / behaviors / ERC20Pausable.behavior.js View on Github external
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 }));
      });
    });
github etoroxlabs / eToken / test / token / ERC20 / behaviors / ERC20Pausable.behavior.js View on Github external
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 }));
      });
    });
github etoroxlabs / eToken / test / token / ERC20 / behaviors / ERC20.internal.behavior.js View on Github external
it('rejects burning more than allowance', async function () {
        await shouldFail.reverting(this.token.burnFrom(owner, allowance.plus(1)));
      });
github etoroxlabs / eToken / test / token / ERC20 / behaviors / ERC20Burnable.behavior.js View on Github external
it('reverts', async function () {
        await this.token.approve(burner, amount - 1, { from: owner });
        await shouldFail.reverting(this.token.burnFrom(owner, amount, { from: burner }));
      });
    });
github etoroxlabs / eToken / test / token / ERC20 / behaviors / ERC20.public.behavior.js View on Github external
it('reverts', async function () {
        await shouldFail.reverting(this.token.transfer(to, 100, { from: owner }));
      });
    });