add test for balance and web3 object

This commit is contained in:
Iuri Matias 2018-06-08 13:10:47 -04:00
parent 7fd7c770de
commit 9f18c7ff0e
1 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,12 @@ config({
contract("AnotherStorage", function() { contract("AnotherStorage", function() {
this.timeout(0); 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() { it("set SimpleStorage address", async function() {
let result = await AnotherStorage.methods.simpleStorageAddress().call(); let result = await AnotherStorage.methods.simpleStorageAddress().call();
assert.equal(result.toString(), SimpleStorage.options.address); assert.equal(result.toString(), SimpleStorage.options.address);