Skip to content

Commit 56d1f4a

Browse files
committed
Update after rebasing
1 parent 1ed43ae commit 56d1f4a

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

test/extensions/evaluated-expenditures.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { soliditySha3 } from "web3-utils";
77

88
import { UINT256_MAX, WAD } from "../../helpers/constants";
99
import { setupEtherRouter } from "../../helpers/upgradable-contracts";
10-
import { checkErrorRevert, web3GetCode } from "../../helpers/test-helper";
10+
import { checkErrorRevert, web3GetCode, getExtensionAddressFromTx } from "../../helpers/test-helper";
1111
import { setupColonyNetwork, setupRandomColony, setupMetaColonyWithLockedCLNYToken } from "../../helpers/test-data-generator";
1212

1313
const { expect } = chai;
@@ -46,9 +46,8 @@ contract("EvaluatedExpenditure", (accounts) => {
4646
beforeEach(async () => {
4747
({ colony } = await setupRandomColony(colonyNetwork));
4848

49-
await colony.installExtension(EVALUATED_EXPENDITURE, evaluatedExpenditureVersion);
50-
51-
const evaluatedExpenditureAddress = await colonyNetwork.getExtensionInstallation(EVALUATED_EXPENDITURE, colony.address);
49+
const tx = await colony.installExtension(EVALUATED_EXPENDITURE, evaluatedExpenditureVersion);
50+
const evaluatedExpenditureAddress = getExtensionAddressFromTx(tx);
5251
evaluatedExpenditure = await EvaluatedExpenditure.at(evaluatedExpenditureAddress);
5352

5453
await colony.setArbitrationRole(1, UINT256_MAX, evaluatedExpenditure.address, 1, true);

test/extensions/voting-rep.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,9 +1232,6 @@ contract("Voting Reputation", (accounts) => {
12321232
});
12331233

12341234
it("can take an action to install an extension", async () => {
1235-
let installation = await colonyNetwork.getExtensionInstallation(soliditySha3("OneTxPayment"), colony.address);
1236-
expect(installation).to.be.equal(ADDRESS_ZERO);
1237-
12381235
const oneTxPaymentImplementation = await OneTxPayment.new();
12391236
const resolver = await Resolver.new();
12401237
await setupEtherRouter("OneTxPayment", { OneTxPayment: oneTxPaymentImplementation.address }, resolver);
@@ -1250,11 +1247,12 @@ contract("Voting Reputation", (accounts) => {
12501247

12511248
await forwardTime(STAKE_PERIOD, this);
12521249

1253-
const { logs } = await voting.finalizeMotion(motionId);
1254-
expect(logs[1].args.executed).to.be.true;
1250+
const tx = await voting.finalizeMotion(motionId);
1251+
expect(tx.logs[1].args.executed).to.be.true;
12551252

1256-
installation = await colonyNetwork.getExtensionInstallation(soliditySha3("OneTxPayment"), colony.address);
1257-
expect(installation).to.not.be.equal(ADDRESS_ZERO);
1253+
const extensionAddress = getExtensionAddressFromTx(tx);
1254+
const colonyAddress = await colonyNetwork.getExtensionMultiInstallation(extensionAddress);
1255+
expect(colonyAddress).to.equal(colony.address);
12581256
});
12591257

12601258
it("can take an action with an arbitrary target", async () => {

0 commit comments

Comments
 (0)