How to use the openzeppelin-solidity/test/helpers/assertRevert 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 ConsenSys / Stow-Smart-Contracts / test / 7_policies_tests.js View on Github external
it('should revert if not conforming', async () => {
      await policy.setVal(false);
      assertRevert(policies.policyIsValid(
        testDataHash,
        accounts[0],
        testDataUri,
        policy.address
      ));
    });
  });
github ConsenSys / Stow-Smart-Contracts / test / 7_policies_tests.js View on Github external
it('should revert if it doesnt follow existing policies', async () => {
      await records.addPolicyToRecord(testDataHash, policy.address);
      await policy.setVal(false);
      assertRevert(policies.followsExistingPolicies(
        testDataHash,
        accounts[0],
        testDataUri
      ));
    });
  });