SupportsInterfaceWithLookup.test.js 645 B

123456789101112131415161718192021222324
  1. const { shouldSupportInterfaces } = require('./SupportsInterface.behavior');
  2. const { assertRevert } = require('../helpers/assertRevert');
  3. const SupportsInterfaceWithLookup = artifacts.require('SupportsInterfaceWithLookupMock');
  4. require('chai')
  5. .use(require('chai-as-promised'))
  6. .should();
  7. contract('SupportsInterfaceWithLookup', function (accounts) {
  8. beforeEach(async function () {
  9. this.mock = await SupportsInterfaceWithLookup.new();
  10. });
  11. it('does not allow 0xffffffff', async function () {
  12. await assertRevert(
  13. this.mock.registerInterface(0xffffffff)
  14. );
  15. });
  16. shouldSupportInterfaces([
  17. 'ERC165',
  18. ]);
  19. });