modify update hash test
This commit is contained in:
parent
8927c55661
commit
ab6d6a4025
@ -111,7 +111,7 @@ contract('Contributor app', (accounts) => {
|
|||||||
id = await contributor.coreContributorsCount();
|
id = await contributor.coreContributorsCount();
|
||||||
oldAccount = root;
|
oldAccount = root;
|
||||||
newAccount = member1;
|
newAccount = member1;
|
||||||
hashDigest = '0x1';
|
hashDigest = '0x1000000000000000000000000000000000000000000000000000000000000000';
|
||||||
hashFunction = 1;
|
hashFunction = 1;
|
||||||
hashSize = 1;
|
hashSize = 1;
|
||||||
});
|
});
|
||||||
@ -145,8 +145,10 @@ contract('Contributor app', (accounts) => {
|
|||||||
|
|
||||||
it('update contributor profile hash', async() => {
|
it('update contributor profile hash', async() => {
|
||||||
await contributor.updateContributorProfileHash(id.toNumber(), hashDigest, hashFunction, hashSize);
|
await contributor.updateContributorProfileHash(id.toNumber(), hashDigest, hashFunction, hashSize);
|
||||||
let contributorId = await contributor.getContributorIdByAddress(oldAccount);
|
let contributorProfile = await contributor.contributors(id.toNumber());
|
||||||
assert.equal(contributorId.toNumber(), 0);
|
assert.equal(hashDigest, contributorProfile[1]);
|
||||||
|
assert.equal(hashFunction, contributorProfile[2].toNumber());
|
||||||
|
assert.equal(hashSize, contributorProfile[3].toNumber());
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should revert when update contributor profile hash from address that does not have permission", async() => {
|
it("should revert when update contributor profile hash from address that does not have permission", async() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user