@ -26,8 +26,8 @@ function shouldBehaveLikeEscrow (owner, [payee1, payee2]) {
|
||||
});
|
||||
|
||||
it('emits a deposited event', async function () {
|
||||
const { logs } = await this.escrow.deposit(payee1, { from: owner, value: amount });
|
||||
expectEvent.inLogs(logs, 'Deposited', {
|
||||
const receipt = await this.escrow.deposit(payee1, { from: owner, value: amount });
|
||||
expectEvent(receipt, 'Deposited', {
|
||||
payee: payee1,
|
||||
weiAmount: amount,
|
||||
});
|
||||
@ -79,8 +79,8 @@ function shouldBehaveLikeEscrow (owner, [payee1, payee2]) {
|
||||
|
||||
it('emits a withdrawn event', async function () {
|
||||
await this.escrow.deposit(payee1, { from: owner, value: amount });
|
||||
const { logs } = await this.escrow.withdraw(payee1, { from: owner });
|
||||
expectEvent.inLogs(logs, 'Withdrawn', {
|
||||
const receipt = await this.escrow.withdraw(payee1, { from: owner });
|
||||
expectEvent(receipt, 'Withdrawn', {
|
||||
payee: payee1,
|
||||
weiAmount: amount,
|
||||
});
|
||||
|
||||
@ -54,8 +54,8 @@ contract('RefundEscrow', function (accounts) {
|
||||
'Ownable: caller is not the owner',
|
||||
);
|
||||
|
||||
const { logs } = await this.escrow.close({ from: owner });
|
||||
expectEvent.inLogs(logs, 'RefundsClosed');
|
||||
const receipt = await this.escrow.close({ from: owner });
|
||||
expectEvent(receipt, 'RefundsClosed');
|
||||
});
|
||||
|
||||
context('closed state', function () {
|
||||
@ -101,8 +101,8 @@ contract('RefundEscrow', function (accounts) {
|
||||
'Ownable: caller is not the owner',
|
||||
);
|
||||
|
||||
const { logs } = await this.escrow.enableRefunds({ from: owner });
|
||||
expectEvent.inLogs(logs, 'RefundsEnabled');
|
||||
const receipt = await this.escrow.enableRefunds({ from: owner });
|
||||
expectEvent(receipt, 'RefundsEnabled');
|
||||
});
|
||||
|
||||
context('refund state', function () {
|
||||
|
||||
Reference in New Issue
Block a user