Added sender parameter to initializers using msg.sender.
This commit is contained in:
@ -5,13 +5,13 @@ const { shouldBehaveLikeOwnable } = require('./Ownable.behavior');
|
||||
|
||||
const Ownable = artifacts.require('OwnableMock');
|
||||
|
||||
contract('Ownable', function ([_, owner, ...otherAccounts]) {
|
||||
contract('Ownable', function ([_, owner, anyone, ...otherAccounts]) {
|
||||
beforeEach(async function () {
|
||||
this.ownable = await Ownable.new({ from: owner });
|
||||
});
|
||||
|
||||
it('cannot be reinitialized', async function () {
|
||||
await expectThrow(this.ownable.initialize(), EVMRevert);
|
||||
await expectThrow(this.ownable.initialize(anyone), EVMRevert);
|
||||
});
|
||||
|
||||
shouldBehaveLikeOwnable(owner, otherAccounts);
|
||||
|
||||
Reference in New Issue
Block a user