From 55d2bc14d0d51eb62bb3ad066290ef0631764131 Mon Sep 17 00:00:00 2001 From: Jarrad Hope Date: Fri, 8 Feb 2019 23:21:53 +0700 Subject: [PATCH] add test todo's --- contracts/Meritocracy.sol | 2 +- test/Meritocracy_spec.js | 27 ++++++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/contracts/Meritocracy.sol b/contracts/Meritocracy.sol index 437438a..20b4257 100644 --- a/contracts/Meritocracy.sol +++ b/contracts/Meritocracy.sol @@ -223,7 +223,7 @@ contract Meritocracy { c.received = 0; c.allocation = 0; // WARN: Should totalReceived and totalForfeited be zeroed-out? - ERC20Token(token).transferFrom(address(this), c.addr, r); + ERC20Token(token).transferFrom(address(this), c.addr, r); // Transfer any owed tokens to contributor } lastForfeit = block.timestamp; token = _token; diff --git a/test/Meritocracy_spec.js b/test/Meritocracy_spec.js index 8b90b80..ccf62a9 100644 --- a/test/Meritocracy_spec.js +++ b/test/Meritocracy_spec.js @@ -102,7 +102,11 @@ contract("Meritocracy", function () { assert.strictEqual(parseInt(contributor.allocation), individualAllocation); // 333 }); + // TODO Addadmin + // TODO RemoveAdmin + it("maxContributor + 1 fails", async function () { + // TODO change so admin adds them var result; let contributorCount = 3; let additionalContributorsToMax = 7; @@ -119,15 +123,20 @@ contract("Meritocracy", function () { } }); + // TODO award + // TODO withdraw before and after - // it("set storage value", async function () { - // await Meritocracy.methods.set(150).send(); - // let result = await SimpleStorage.methods.get().call(); - // assert.strictEqual(parseInt(result, 10), 150); - // }); + // TODO forfeitAllocations - // it("should have account with balance", async function() { - // let balance = await web3.eth.getBalance(accounts[0]); - // assert.ok(parseInt(balance, 10) > 0); - // }); + // TODO withdraw after forfeitAllocations + + // TODO setMaxContributors smaller than max + // TODO removeContributors + // TODO setMaxContributors again + // TODO addContributors + // TODO changeOwner + + // TODO escape + // TODO changeToken + // TODO escape overload? });