[WIP] Solidity contracts tests #106
@@ -111,7 +111,7 @@ contract('Contributor app', (accounts) => {
|
||||
|
|
||||
id = await contributor.coreContributorsCount();
|
||||
oldAccount = root;
|
||||
newAccount = member1;
|
||||
hashDigest = '0x1';
|
||||
|
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
|
||||
hashDigest = '0x1000000000000000000000000000000000000000000000000000000000000000';
|
||||
|
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
|
||||
hashFunction = 1;
|
||||
hashSize = 1;
|
||||
});
|
||||
@@ -145,8 +145,10 @@ contract('Contributor app', (accounts) => {
|
||||
|
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
|
||||
|
||||
it('update contributor profile hash', async() => {
|
||||
await contributor.updateContributorProfileHash(id.toNumber(), hashDigest, hashFunction, hashSize);
|
||||
let contributorId = await contributor.getContributorIdByAddress(oldAccount);
|
||||
|
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
|
||||
assert.equal(contributorId.toNumber(), 0);
|
||||
|
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
|
||||
let contributorProfile = await contributor.contributors(id.toNumber());
|
||||
|
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
|
||||
assert.equal(hashDigest, contributorProfile[1]);
|
||||
|
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
|
||||
assert.equal(hashFunction, contributorProfile[2].toNumber());
|
||||
|
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
|
||||
assert.equal(hashSize, contributorProfile[3].toNumber());
|
||||
|
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
|
||||
});
|
||||
|
||||
it("should revert when update contributor profile hash from address that does not have permission", async() => {
|
||||
|
||||
|
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
This doesn't actually check for an updated hash afaics. This doesn't actually check for an updated hash afaics.
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
yup...solved in this commit yup...solved in this [commit](https://github.com/67P/kredits-contracts/pull/106/commits/ab6d6a40251a9589d99886b0e53bb86b74f50080)
|
||||
This doesn't actually check for an updated hash afaics.
This doesn't actually check for an updated hash afaics.
yup...solved in this commit
yup...solved in this commit