lint fix
This commit is contained in:
@@ -1,27 +1,30 @@
|
||||
const namehash = require('eth-ens-namehash').hash;
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
const Proposal = artifacts.require("Proposal.sol");
|
||||
const { Contributor, getContributorContract } = require("../../contributor/artifacts");
|
||||
const { Contribution, getContributionContract } = require("../../contribution/artifacts");
|
||||
|
||||
const getContract = name => artifacts.require(name)
|
||||
// eslint-disable-next-line no-undef
|
||||
const getContract = name => artifacts.require(name);
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { assertRevert } = require('@aragon/test-helpers/assertThrow');
|
||||
|
||||
const ZERO_ADDR = '0x0000000000000000000000000000000000000000';
|
||||
|
||||
contract('Proposal app', (accounts) => {
|
||||
let kernelBase, aclBase, daoFactory, dao, acl, proposal, contribution, contributor;
|
||||
let kernelBase, aclBase, daoFactory, dao, r, acl, proposal, contribution, contributor;
|
||||
|
||||
const root = accounts[0];
|
||||
const member1 = accounts[1];
|
||||
|
||||
before(async() => {
|
||||
kernelBase = await getContract('Kernel').new(true) // petrify immediately
|
||||
aclBase = await getContract('ACL').new()
|
||||
// eslint-disable-next-line no-undef
|
||||
before(async () => {
|
||||
kernelBase = await getContract('Kernel').new(true); // petrify immediately
|
||||
aclBase = await getContract('ACL').new();
|
||||
daoFactory = await getContract('DAOFactory').new(kernelBase.address, aclBase.address, ZERO_ADDR);
|
||||
r = await daoFactory.newDAO(root)
|
||||
dao = getContract('Kernel').at(r.logs.filter(l => l.event == 'DeployDAO')[0].args.dao)
|
||||
acl = getContract('ACL').at(await dao.acl())
|
||||
r = await daoFactory.newDAO(root);
|
||||
dao = getContract('Kernel').at(r.logs.filter(l => l.event == 'DeployDAO')[0].args.dao);
|
||||
acl = getContract('ACL').at(await dao.acl());
|
||||
|
||||
//create dao mamnager permission for coin owner
|
||||
await acl.createPermission(
|
||||
@@ -47,7 +50,7 @@ contract('Proposal app', (accounts) => {
|
||||
0x0,
|
||||
false,
|
||||
{ from: root }
|
||||
)
|
||||
);
|
||||
proposal = Proposal.at(
|
||||
receipt.logs.filter(l => l.event == 'NewAppProxy')[0].args.proxy
|
||||
);
|
||||
@@ -58,7 +61,7 @@ contract('Proposal app', (accounts) => {
|
||||
0x0,
|
||||
false,
|
||||
{ from: root }
|
||||
)
|
||||
);
|
||||
contributor = Contributor.at(
|
||||
receipt.logs.filter(l => l.event == 'NewAppProxy')[0].args.proxy
|
||||
);
|
||||
@@ -69,7 +72,7 @@ contract('Proposal app', (accounts) => {
|
||||
0x0,
|
||||
false,
|
||||
{ from: root }
|
||||
)
|
||||
);
|
||||
contribution = Contribution.at(
|
||||
receipt.logs.filter(l => l.event == 'NewAppProxy')[0].args.proxy
|
||||
);
|
||||
@@ -83,7 +86,7 @@ contract('Proposal app', (accounts) => {
|
||||
await proposal.ADD_PROPOSAL_ROLE(),
|
||||
root,
|
||||
{ from: root }
|
||||
)
|
||||
);
|
||||
|
||||
await acl.createPermission(
|
||||
root,
|
||||
@@ -102,7 +105,7 @@ contract('Proposal app', (accounts) => {
|
||||
await contribution.ADD_CONTRIBUTION_ROLE(),
|
||||
root,
|
||||
{ from: root }
|
||||
)
|
||||
);
|
||||
|
||||
await acl.createPermission(
|
||||
root,
|
||||
@@ -123,34 +126,39 @@ contract('Proposal app', (accounts) => {
|
||||
await contributor.MANAGE_CONTRIBUTORS_ROLE(),
|
||||
root,
|
||||
{ from: root }
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
describe("Owner default permissions", async() => {
|
||||
it('check owner can add proposal', async() => {
|
||||
describe("Owner default permissions", async () => {
|
||||
it('check owner can add proposal', async () => {
|
||||
let addProposalPermission = await acl.hasPermission(root, proposal.address, await proposal.ADD_PROPOSAL_ROLE());
|
||||
// eslint-disable-next-line no-undef
|
||||
assert.equal(addProposalPermission, true);
|
||||
});
|
||||
|
||||
it('check owner can veto contribution', async() => {
|
||||
it('check owner can veto contribution', async () => {
|
||||
let vetoProposalPermission = await acl.hasPermission(root, proposal.address, await proposal.VOTE_PROPOSAL_ROLE());
|
||||
// eslint-disable-next-line no-undef
|
||||
assert.equal(vetoProposalPermission, true);
|
||||
});
|
||||
|
||||
it('check owner can add contribution', async() => {
|
||||
it('check owner can add contribution', async () => {
|
||||
let addContributionPermission = await acl.hasPermission(root, contribution.address, await contribution.ADD_CONTRIBUTION_ROLE());
|
||||
// eslint-disable-next-line no-undef
|
||||
assert.equal(addContributionPermission, true);
|
||||
});
|
||||
|
||||
it('check owner can veto contribution', async() => {
|
||||
it('check owner can veto contribution', async () => {
|
||||
let vetoContributionPermission = await acl.hasPermission(root, contribution.address, await contribution.VETO_CONTRIBUTION_ROLE());
|
||||
// eslint-disable-next-line no-undef
|
||||
assert.equal(vetoContributionPermission, true);
|
||||
});
|
||||
|
||||
it('check owner can manage contributors', async() => {
|
||||
it('check owner can manage contributors', async () => {
|
||||
let manageContributorsPermission = await acl.hasPermission(root, contributor.address, await contribution.MANAGE_CONTRIBUTORS_ROLE());
|
||||
// eslint-disable-next-line no-undef
|
||||
assert.equal(manageContributorsPermission, true);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user