Skip to content

Commit

Permalink
Added Events tests of Pausable contract (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
viquezclaudio authored and Leo Arias committed Aug 28, 2018
1 parent 524a276 commit 132994d
Showing 1 changed file with 9 additions and 0 deletions.
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 @@ -53,4 +54,12 @@ contract('Pausable', function () {

(await this.Pausable.drasticMeasureTaken()).should.equal(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');
});
});

0 comments on commit 132994d

Please sign in to comment.