Files
openzeppelin-contracts/test/ownership/Ownable.test.js
Francisco Giordano 04186e2cf6 fix missing helper
2019-01-22 17:42:48 -03:00

17 lines
522 B
JavaScript

const { shouldFail } = require('openzeppelin-test-helpers');
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);
});