Added makeInterfaceId tests. (#1530)

This commit is contained in:
Nicolás Venturo
2018-11-29 23:10:03 -03:00
committed by GitHub
parent 714ab21a6e
commit 9faebb5365
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,20 @@
const { makeInterfaceId } = require('../makeInterfaceId');
const OwnableInterfaceId = artifacts.require('OwnableInterfaceId');
require('chai')
.should();
describe('makeInterfaceId', function () {
it('calculates the EIP165 interface id from function signatures', async function () {
const calculator = await OwnableInterfaceId.new();
const ownableId = await calculator.getInterfaceId();
makeInterfaceId([
'owner()',
'isOwner()',
'renounceOwnership()',
'transferOwnership(address)',
]).should.equal(ownableId);
});
});