add test todo's

This commit is contained in:
Jarrad Hope 2019-02-08 23:21:53 +07:00
parent 5d6d865a95
commit 55d2bc14d0
No known key found for this signature in database
GPG Key ID: D549F0EF6ACE1FE7
2 changed files with 19 additions and 10 deletions

View File

@ -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;

View File

@ -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?
});