Fix deprecated expectEvent.inLogs #3332 (#3333)

This commit is contained in:
Niccolò Petti
2022-04-23 15:20:55 +02:00
committed by GitHub
parent 5a75065659
commit d4e6236b2b
16 changed files with 133 additions and 136 deletions

View File

@ -5,8 +5,8 @@ const ContextMock = artifacts.require('ContextMock');
function shouldBehaveLikeRegularContext (sender) {
describe('msgSender', function () {
it('returns the transaction sender when called from an EOA', async function () {
const { logs } = await this.context.msgSender({ from: sender });
expectEvent.inLogs(logs, 'Sender', { sender });
const receipt = await this.context.msgSender({ from: sender });
expectEvent(receipt, 'Sender', { sender });
});
it('returns the transaction sender when from another contract', async function () {
@ -26,8 +26,8 @@ function shouldBehaveLikeRegularContext (sender) {
});
it('returns the transaction data when called from an EOA', async function () {
const { logs } = await this.context.msgData(integerValue, stringValue);
expectEvent.inLogs(logs, 'Data', { data: callData, integerValue, stringValue });
const receipt = await this.context.msgData(integerValue, stringValue);
expectEvent(receipt, 'Data', { data: callData, integerValue, stringValue });
});
it('returns the transaction sender when from another contract', async function () {