From bad45772c145f0b431cef39d0324cd2fe3dba5dc Mon Sep 17 00:00:00 2001 From: The3D Date: Tue, 6 Oct 2020 11:02:34 +0200 Subject: [PATCH] Updated tests on unfreeze --- test/configurator.spec.ts | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/test/configurator.spec.ts b/test/configurator.spec.ts index 8c24d43d..d83f5d71 100644 --- a/test/configurator.spec.ts +++ b/test/configurator.spec.ts @@ -51,7 +51,7 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => { stableBorrowRateEnabled, borrowingEnabled, isActive, - isFreezed + isFreezed, } = await pool.getReserveConfigurationData(weth.address); expect(borrowingEnabled).to.be.equal(true); @@ -62,15 +62,34 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => { 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(reserveFactor).to.be.equal(0); }); it('Unfreezes the ETH reserve', async () => { const {configurator, pool, weth} = testEnv; await configurator.unfreezeReserve(weth.address); - const {isFreezed} = await pool.getReserveConfigurationData(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); }); it('Check the onlyAaveAdmin on freezeReserve ', async () => { @@ -101,7 +120,7 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => { stableBorrowRateEnabled, borrowingEnabled, isActive, - isFreezed + isFreezed, } = await pool.getReserveConfigurationData(weth.address); expect(borrowingEnabled).to.be.equal(false); @@ -113,7 +132,6 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => { expect(liquidationBonus).to.be.equal(10500); expect(stableBorrowRateEnabled).to.be.equal(true); expect(reserveFactor).to.be.equal(0); - }); it('Activates the ETH reserve for borrowing', async () => {