From c22b70c6bc6d1e5231673bdc8f07ed044258f77a Mon Sep 17 00:00:00 2001 From: Thomas Hodges Date: Mon, 18 May 2020 13:52:36 -0500 Subject: [PATCH] Numbers should padLeft --- test/MyContract_test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/MyContract_test.js b/test/MyContract_test.js index 85980e5..dd9c076 100644 --- a/test/MyContract_test.js +++ b/test/MyContract_test.js @@ -83,7 +83,7 @@ contract('MyContract', accounts => { describe('#fulfill', () => { const expected = 50000 - const response = web3.utils.padRight(web3.utils.toHex(expected), 64) + const response = web3.utils.padLeft(web3.utils.toHex(expected), 64) let request beforeEach(async () => { @@ -111,8 +111,8 @@ contract('MyContract', accounts => { it('records the data given to it by the oracle', async () => { const currentPrice = await cc.data.call() assert.equal( - web3.utils.toHex(currentPrice), - web3.utils.padRight(expected, 64), + web3.utils.padLeft(web3.utils.toHex(currentPrice), 64), + web3.utils.padLeft(expected, 64), ) })