Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/lifecycle/Pausable.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { assertRevert } = require('../helpers/assertRevert');
const expectEvent = require('../helpers/expectEvent');
const PausableMock = artifacts.require('PausableMock');

const BigNumber = web3.BigNumber;
Expand Down Expand Up @@ -64,4 +65,12 @@ contract('Pausable', function () {
const drasticMeasureTaken = await this.Pausable.drasticMeasureTaken();
drasticMeasureTaken.should.be.false;
});

it('should log Pause and Unpause events appropriately', async function () {
const setPauseLogs = (await this.Pausable.pause()).logs;
expectEvent.inLogs(setPauseLogs, 'Pause');

const setUnPauseLogs = (await this.Pausable.unpause()).logs;
expectEvent.inLogs(setUnPauseLogs, 'Unpause');
});
});