Now testing events in constructors! (#1511)
* Added inTransaction tests.
* Added expectEvent.inConstructor.
* Changed inTransaction, removed decodeLogs.
* Flipped comparison to improve the error message.
* Improved expectEvent tests.
* Migrated tests to use expectEvent.
* Added roles constructor tests.
* Fixed linter errors.
* Made lodash a dev dependency.
* Added more inLogs tests.
* Update expectEvent.test.js
* Removed lodash.
* Moved role constructor tests to public role behavior.
* Revert "Flipped comparison to improve the error message."
This reverts commit 438c57833d.
* Replaced chai-as-promised with shouldFail.
This commit is contained in:
@ -19,6 +19,12 @@ function shouldBehaveLikePublicRole (authorized, otherAuthorized, [anyone], role
|
||||
(await this.contract[`is${rolename}`](anyone)).should.equal(false);
|
||||
});
|
||||
|
||||
it('emits events during construction', async function () {
|
||||
await expectEvent.inConstruction(this.contract, `${rolename}Added`, {
|
||||
account: authorized,
|
||||
});
|
||||
});
|
||||
|
||||
it('reverts when querying roles for the null account', async function () {
|
||||
await shouldFail.reverting(this.contract[`is${rolename}`](ZERO_ADDRESS));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user