mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
test: added test for registering/ unregistering riskAdmins
This commit is contained in:
parent
331b86b724
commit
5f14b12fdf
|
@ -971,4 +971,23 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
LPC_RESERVE_LIQUIDITY_NOT_0
|
||||
).to.be.revertedWith(LPC_RESERVE_LIQUIDITY_NOT_0);
|
||||
});
|
||||
it('Register a new risk Admin', async () => {
|
||||
const { dai, pool, configurator, users, riskAdmin } = testEnv;
|
||||
await configurator.registerRiskAdmin(users[3].address);
|
||||
|
||||
const isRiskAdminRegistered = await configurator.isRiskAdmin(riskAdmin.address);
|
||||
const isNewRegistered = await configurator.isRiskAdmin(users[3].address);
|
||||
expect(isNewRegistered).to.be.true;
|
||||
expect(isRiskAdminRegistered).to.be.true;
|
||||
});
|
||||
it('Unregister a risk Admins', async () => {
|
||||
const { dai, pool, configurator, users, riskAdmin } = testEnv;
|
||||
await configurator.unregisterRiskAdmin(users[3].address);
|
||||
await configurator.unregisterRiskAdmin(riskAdmin.address);
|
||||
|
||||
const isRiskAdminRegistered = await configurator.isRiskAdmin(riskAdmin.address);
|
||||
const isNewRegistered = await configurator.isRiskAdmin(users[3].address);
|
||||
expect(isNewRegistered).to.be.false;
|
||||
expect(isRiskAdminRegistered).to.be.false;
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user