ERC165.test.js 493 B

123456789101112131415161718
  1. const { shouldFail } = require('openzeppelin-test-helpers');
  2. const { shouldSupportInterfaces } = require('./SupportsInterface.behavior');
  3. const ERC165Mock = artifacts.require('ERC165Mock');
  4. contract('ERC165', function () {
  5. beforeEach(async function () {
  6. this.mock = await ERC165Mock.new();
  7. });
  8. it('does not allow 0xffffffff', async function () {
  9. await shouldFail.reverting(this.mock.registerInterface('0xffffffff'));
  10. });
  11. shouldSupportInterfaces([
  12. 'ERC165',
  13. ]);
  14. });