Skip to content

Commit

Permalink
Update after rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
kronosapiens committed Jul 27, 2021
1 parent 1ed43ae commit 56d1f4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
7 changes: 3 additions & 4 deletions test/extensions/evaluated-expenditures.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { soliditySha3 } from "web3-utils";

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

const { expect } = chai;
Expand Down Expand Up @@ -46,9 +46,8 @@ contract("EvaluatedExpenditure", (accounts) => {
beforeEach(async () => {
({ colony } = await setupRandomColony(colonyNetwork));

await colony.installExtension(EVALUATED_EXPENDITURE, evaluatedExpenditureVersion);

const evaluatedExpenditureAddress = await colonyNetwork.getExtensionInstallation(EVALUATED_EXPENDITURE, colony.address);
const tx = await colony.installExtension(EVALUATED_EXPENDITURE, evaluatedExpenditureVersion);
const evaluatedExpenditureAddress = getExtensionAddressFromTx(tx);
evaluatedExpenditure = await EvaluatedExpenditure.at(evaluatedExpenditureAddress);

await colony.setArbitrationRole(1, UINT256_MAX, evaluatedExpenditure.address, 1, true);
Expand Down
12 changes: 5 additions & 7 deletions test/extensions/voting-rep.js
Original file line number Diff line number Diff line change
Expand Up @@ -1232,9 +1232,6 @@ contract("Voting Reputation", (accounts) => {
});

it("can take an action to install an extension", async () => {
let installation = await colonyNetwork.getExtensionInstallation(soliditySha3("OneTxPayment"), colony.address);
expect(installation).to.be.equal(ADDRESS_ZERO);

const oneTxPaymentImplementation = await OneTxPayment.new();
const resolver = await Resolver.new();
await setupEtherRouter("OneTxPayment", { OneTxPayment: oneTxPaymentImplementation.address }, resolver);
Expand All @@ -1250,11 +1247,12 @@ contract("Voting Reputation", (accounts) => {

await forwardTime(STAKE_PERIOD, this);

const { logs } = await voting.finalizeMotion(motionId);
expect(logs[1].args.executed).to.be.true;
const tx = await voting.finalizeMotion(motionId);
expect(tx.logs[1].args.executed).to.be.true;

installation = await colonyNetwork.getExtensionInstallation(soliditySha3("OneTxPayment"), colony.address);
expect(installation).to.not.be.equal(ADDRESS_ZERO);
const extensionAddress = getExtensionAddressFromTx(tx);
const colonyAddress = await colonyNetwork.getExtensionMultiInstallation(extensionAddress);
expect(colonyAddress).to.equal(colony.address);
});

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

0 comments on commit 56d1f4a

Please sign in to comment.