* Add BigNumber support to expectEvent/inLogs (#1026)
* switched direct logs array check to expectEvent method in AllowanceCrowdsale.test.js
* Refactor expectEvent.inLogs function to use simple value number check
* Introduced should.be.bignumber method to compare BigNumber values
* Use expectEvent to test logs (#1232)
* Removed trailing space
(cherry picked from commit 536262f2ec)
This commit is contained in:
@ -54,9 +54,8 @@ contract('RefundEscrow', function ([_, primary, beneficiary, refundee1, refundee
|
||||
it('only the primary account can enter closed state', async function () {
|
||||
await expectThrow(this.escrow.close({ from: beneficiary }), EVMRevert);
|
||||
|
||||
const receipt = await this.escrow.close({ from: primary });
|
||||
|
||||
expectEvent.inLogs(receipt.logs, 'Closed');
|
||||
const { logs } = await this.escrow.close({ from: primary });
|
||||
expectEvent.inLogs(logs, 'Closed');
|
||||
});
|
||||
|
||||
context('closed state', function () {
|
||||
@ -94,9 +93,8 @@ contract('RefundEscrow', function ([_, primary, beneficiary, refundee1, refundee
|
||||
it('only the primary account can enter refund state', async function () {
|
||||
await expectThrow(this.escrow.enableRefunds({ from: beneficiary }), EVMRevert);
|
||||
|
||||
const receipt = await this.escrow.enableRefunds({ from: primary });
|
||||
|
||||
expectEvent.inLogs(receipt.logs, 'RefundsEnabled');
|
||||
const { logs } = await this.escrow.enableRefunds({ from: primary });
|
||||
expectEvent.inLogs(logs, 'RefundsEnabled');
|
||||
});
|
||||
|
||||
context('refund state', function () {
|
||||
|
||||
Reference in New Issue
Block a user