Added sender parameter to initializers using msg.sender.

This commit is contained in:
Nicolás Venturo
2018-10-05 16:24:07 -03:00
parent 716efc4b51
commit 14dd3f6610
47 changed files with 79 additions and 79 deletions

View File

@ -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);