Add tests to extend code coverage (#2586)

This commit is contained in:
Hadrien Croubois
2021-03-15 17:01:47 +01:00
committed by GitHub
parent d5194725b7
commit cd443f0d5b
8 changed files with 91 additions and 11 deletions

View File

@ -35,6 +35,10 @@ contract('ProxyAdmin', function (accounts) {
const admin = await this.proxyAdmin.getProxyAdmin(this.proxy.address);
expect(admin).to.be.equal(this.proxyAdmin.address);
});
it('call to invalid proxy', async function () {
await expectRevert.unspecified(this.proxyAdmin.getProxyAdmin(this.implementationV1.address));
});
});
describe('#changeProxyAdmin', function () {
@ -56,6 +60,10 @@ contract('ProxyAdmin', function (accounts) {
const implementationAddress = await this.proxyAdmin.getProxyImplementation(this.proxy.address);
expect(implementationAddress).to.be.equal(this.implementationV1.address);
});
it('call to invalid proxy', async function () {
await expectRevert.unspecified(this.proxyAdmin.getProxyImplementation(this.implementationV1.address));
});
});
describe('#upgrade', function () {