controller support

This commit is contained in:
Ricardo Guilherme Schmidt 2019-03-28 19:12:31 -03:00
parent ca6153e543
commit 8564bab9f4
No known key found for this signature in database
GPG Key ID: BFB3F5C8ED618A94

View File

@ -54,7 +54,7 @@ contract("DelegationBase", function() {
it("creates headless delegation", async function () {
let result = await DelegationFactory.methods.createDelegation(utils.zeroAddress,utils.zeroAddress).send();
let result = await DelegationFactory.methods.createDelegation(utils.zeroAddress).send();
var NoDefaultDelegation = new web3.eth.Contract(DelegationBase._jsonInterface, result.events.InstanceCreated.returnValues[0]);
result = await NoDefaultDelegation.methods.delegatedTo(accounts[0]).call()
assert.equal(result, utils.zeroAddress)
@ -63,7 +63,7 @@ contract("DelegationBase", function() {
})
it("creates root delegation", async function () {
let result = await DelegationFactory.methods.createDelegation(utils.zeroAddress,defaultDelegate).send();
let result = await DelegationFactory.methods.createDelegation(utils.zeroAddress,defaultDelegate,defaultDelegate).send();
RootDelegation = new web3.eth.Contract(DelegationBase._jsonInterface, result.events.InstanceCreated.returnValues[0]);
result = await RootDelegation.methods.delegatedTo(utils.zeroAddress).call()
assert.equal(result, defaultDelegate)