Files
openzeppelin-contracts/test/ownership/Ownable.test.js
Francisco Giordano 00f7c19d02 fix remaining tests
2019-01-21 19:28:37 -03:00

20 lines
545 B
JavaScript

const shouldFail = require('../helpers/shouldFail');
require('../helpers/setup');
const { shouldBehaveLikeOwnable } = require('./Ownable.behavior');
const Ownable = artifacts.require('OwnableMock');
contract('Ownable', function ([_, owner, anyone, ...otherAccounts]) {
beforeEach(async function () {
this.ownable = await Ownable.new({ from: owner });
});
it('cannot be reinitialized', async function () {
await shouldFail.reverting(this.ownable.initialize(anyone));
});
shouldBehaveLikeOwnable(owner, otherAccounts);
});