Migrate AccessManager tests to ethers (#4710)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
Ernesto García
2023-11-09 15:56:54 +00:00
committed by GitHub
parent cb1ef861e5
commit cf6ff90b6d
10 changed files with 1240 additions and 1447 deletions

View File

@ -13,6 +13,12 @@ describe('Ownable', function () {
Object.assign(this, await loadFixture(fixture));
});
it('emits ownership transfer events during construction', async function () {
await expect(await this.ownable.deploymentTransaction())
.to.emit(this.ownable, 'OwnershipTransferred')
.withArgs(ethers.ZeroAddress, this.owner.address);
});
it('rejects zero address for initialOwner', async function () {
await expect(ethers.deployContract('$Ownable', [ethers.ZeroAddress]))
.to.be.revertedWithCustomError({ interface: this.ownable.interface }, 'OwnableInvalidOwner')