From f3852d7081e5bb40e6df84f6b9de83a774f30fde Mon Sep 17 00:00:00 2001 From: The3D Date: Tue, 6 Oct 2020 11:36:29 +0200 Subject: [PATCH] Updated test on liquidation bonus --- test/configurator.spec.ts | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/test/configurator.spec.ts b/test/configurator.spec.ts index 82982ec6..3ed53984 100644 --- a/test/configurator.spec.ts +++ b/test/configurator.spec.ts @@ -423,12 +423,28 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => { it('Changes liquidation bonus of the reserve', async () => { const {configurator, pool, weth} = testEnv; - await configurator.setLiquidationBonus(weth.address, '110'); - const {liquidationBonus} = await pool.getReserveConfigurationData(weth.address); - expect(liquidationBonus.toString()).to.be.bignumber.equal( - '110', - 'Invalid Liquidation discount' - ); + await configurator.setLiquidationBonus(weth.address, '11000'); + 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(6000); + expect(liquidationThreshold).to.be.equal(7500); + expect(liquidationBonus).to.be.equal(11000); + expect(stableBorrowRateEnabled).to.be.equal(true); + expect(reserveFactor).to.be.equal(1000); }); it('Check the onlyAaveAdmin on setLiquidationBonus', async () => {