From 9f18c7ff0e9a852d7431f637aeff101caf254416 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 8 Jun 2018 13:10:47 -0400 Subject: [PATCH] add test for balance and web3 object --- test_apps/test_app/test/another_storage_spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test_apps/test_app/test/another_storage_spec.js b/test_apps/test_app/test/another_storage_spec.js index f0ea1b92..8ebc9e3f 100644 --- a/test_apps/test_app/test/another_storage_spec.js +++ b/test_apps/test_app/test/another_storage_spec.js @@ -29,6 +29,12 @@ config({ contract("AnotherStorage", function() { this.timeout(0); + it("should have account with balance", async function() { + let balance = await web3.eth.getBalance(accounts[0]); + assert.ok(parseInt(balance, 10) > 4900000000000000000); + assert.ok(parseInt(balance, 10) <= 5000000000000000000); + }); + it("set SimpleStorage address", async function() { let result = await AnotherStorage.methods.simpleStorageAddress().call(); assert.equal(result.toString(), SimpleStorage.options.address);