Skip to content

Commit 132994d

Browse files
viquezclaudioLeo Arias
authored andcommitted
Added Events tests of Pausable contract (#1207)
1 parent 524a276 commit 132994d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/lifecycle/Pausable.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { assertRevert } = require('../helpers/assertRevert');
2+
const expectEvent = require('../helpers/expectEvent');
23
const PausableMock = artifacts.require('PausableMock');
34

45
const BigNumber = web3.BigNumber;
@@ -53,4 +54,12 @@ contract('Pausable', function () {
5354

5455
(await this.Pausable.drasticMeasureTaken()).should.equal(false);
5556
});
57+
58+
it('should log Pause and Unpause events appropriately', async function () {
59+
const setPauseLogs = (await this.Pausable.pause()).logs;
60+
expectEvent.inLogs(setPauseLogs, 'Pause');
61+
62+
const setUnPauseLogs = (await this.Pausable.unpause()).logs;
63+
expectEvent.inLogs(setUnPauseLogs, 'Unpause');
64+
});
5665
});

0 commit comments

Comments
 (0)