From ab6d6a40251a9589d99886b0e53bb86b74f50080 Mon Sep 17 00:00:00 2001 From: Haythem Sellami Date: Sat, 20 Apr 2019 15:31:29 +0100 Subject: [PATCH] modify update hash test --- apps/contributor/test/contributor.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/contributor/test/contributor.js b/apps/contributor/test/contributor.js index 79601c3..3ea659e 100644 --- a/apps/contributor/test/contributor.js +++ b/apps/contributor/test/contributor.js @@ -111,7 +111,7 @@ contract('Contributor app', (accounts) => { id = await contributor.coreContributorsCount(); oldAccount = root; newAccount = member1; - hashDigest = '0x1'; + hashDigest = '0x1000000000000000000000000000000000000000000000000000000000000000'; hashFunction = 1; hashSize = 1; }); @@ -145,8 +145,10 @@ contract('Contributor app', (accounts) => { it('update contributor profile hash', async() => { await contributor.updateContributorProfileHash(id.toNumber(), hashDigest, hashFunction, hashSize); - let contributorId = await contributor.getContributorIdByAddress(oldAccount); - assert.equal(contributorId.toNumber(), 0); + let contributorProfile = await contributor.contributors(id.toNumber()); + 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() => {