Commit 132994d2 by viquezclaudio Committed by Leo Arias

Added Events tests of Pausable contract (#1207)

parent 524a2767
const { assertRevert } = require('../helpers/assertRevert'); const { assertRevert } = require('../helpers/assertRevert');
const expectEvent = require('../helpers/expectEvent');
const PausableMock = artifacts.require('PausableMock'); const PausableMock = artifacts.require('PausableMock');
const BigNumber = web3.BigNumber; const BigNumber = web3.BigNumber;
...@@ -53,4 +54,12 @@ contract('Pausable', function () { ...@@ -53,4 +54,12 @@ contract('Pausable', function () {
(await this.Pausable.drasticMeasureTaken()).should.equal(false); (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');
});
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment