mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
26 lines
1008 B
TypeScript
26 lines
1008 B
TypeScript
import {expect} from 'chai';
|
|
import {createRandomAddress} from '../helpers/misc-utils';
|
|
import {makeSuite, TestEnv} from './helpers/make-suite';
|
|
import {ProtocolErrors} from '../helpers/types';
|
|
|
|
makeSuite('LendingPoolAddressesProvider', (testEnv: TestEnv) => {
|
|
it('Test the accessibility of the LendingPoolAddressesProvider', async () => {
|
|
const {addressesProvider, users} = testEnv;
|
|
const mockAddress = createRandomAddress();
|
|
const {INVALID_OWNER_REVERT_MSG} = ProtocolErrors;
|
|
|
|
await addressesProvider.transferOwnership(users[1].address);
|
|
|
|
for (const contractFunction of [
|
|
addressesProvider.setLendingPoolImpl,
|
|
addressesProvider.setLendingPoolConfiguratorImpl,
|
|
addressesProvider.setLendingPoolLiquidationManager,
|
|
addressesProvider.setLendingPoolManager,
|
|
addressesProvider.setPriceOracle,
|
|
addressesProvider.setLendingRateOracle,
|
|
]) {
|
|
await expect(contractFunction(mockAddress)).to.be.revertedWith(INVALID_OWNER_REVERT_MSG);
|
|
}
|
|
});
|
|
});
|