Fix #1358 Test helper to send funds (#1367)

* signing prefix added

* Minor improvement

* Tests changed

* Successfully tested

* Minor improvements

* Minor improvements

* Revert "Dangling commas are now required. (#1359)"

This reverts commit a6889776f4.

* fixes #1358

* linting done

* suggested changes
This commit is contained in:
Aniket
2018-10-01 18:09:57 +05:30
committed by Nicolás Venturo
parent a6889776f4
commit fa1dfbd113
3 changed files with 17 additions and 6 deletions

View File

@ -1,4 +1,5 @@
const { ethGetBalance, ethSendTransaction } = require('./helpers/web3');
const { sendEther } = require('./helpers/sendTransaction');
const expectEvent = require('./helpers/expectEvent');
const { assertRevert } = require('./helpers/assertRevert');
@ -17,13 +18,13 @@ contract('BreakInvariantBounty', function ([_, owner, researcher, anyone, nonTar
});
it('can set reward', async function () {
await ethSendTransaction({ from: owner, to: this.bounty.address, value: reward });
await sendEther(owner, this.bounty.address, reward);
(await ethGetBalance(this.bounty.address)).should.be.bignumber.equal(reward);
});
context('with reward', function () {
beforeEach(async function () {
await ethSendTransaction({ from: owner, to: this.bounty.address, value: reward });
await sendEther(owner, this.bounty.address, reward);
});
describe('destroy', function () {