Added Events tests of Pausable contract (#1207)
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
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 () {
|
|||||||
|
|
||||||
(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');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user