Updated tests on enableBorrowingOnReserve

This commit is contained in:
The3D 2020-10-06 11:03:51 +02:00
parent bad45772c1
commit 450cdfa95c

View File

@ -137,9 +137,30 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
it('Activates the ETH reserve for borrowing', async () => {
const {configurator, pool, weth} = testEnv;
await configurator.enableBorrowingOnReserve(weth.address, true);
const {borrowingEnabled} = await pool.getReserveConfigurationData(weth.address);
const {variableBorrowIndex} = await pool.getReserveData(weth.address);
const {
decimals,
ltv,
liquidationBonus,
liquidationThreshold,
reserveFactor,
stableBorrowRateEnabled,
borrowingEnabled,
isActive,
isFreezed,
} = await pool.getReserveConfigurationData(weth.address);
expect(borrowingEnabled).to.be.equal(true);
expect(isActive).to.be.equal(true);
expect(isFreezed).to.be.equal(false);
expect(decimals).to.be.equal(18);
expect(ltv).to.be.equal(7500);
expect(liquidationThreshold).to.be.equal(8000);
expect(liquidationBonus).to.be.equal(10500);
expect(stableBorrowRateEnabled).to.be.equal(true);
expect(reserveFactor).to.be.equal(0);
expect(variableBorrowIndex.toString()).to.be.equal(RAY);
});