mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
fix: fixed small naming/erros in tests
This commit is contained in:
parent
099b1f0b05
commit
5b9dc19b69
test-suites
|
@ -50,8 +50,8 @@ makeSuite('Borrow Cap', (testEnv: TestEnv) => {
|
|||
let daiBorrowCap = (await helpersContract.getReserveCaps(dai.address)).borrowCap;
|
||||
expect(usdcBorrowCap).to.be.equal(MAX_BORROW_CAP);
|
||||
expect(daiBorrowCap).to.be.equal(MAX_BORROW_CAP);
|
||||
let wethBorrowCap = (await helpersContract.getReserveCaps(dai.address)).borrowCap;
|
||||
let wethSupplyCap = (await helpersContract.getReserveCaps(dai.address)).supplyCap;
|
||||
let wethBorrowCap = (await helpersContract.getReserveCaps(weth.address)).borrowCap;
|
||||
let wethSupplyCap = (await helpersContract.getReserveCaps(weth.address)).supplyCap;
|
||||
expect(wethBorrowCap).to.be.equal(MAX_BORROW_CAP);
|
||||
expect(wethSupplyCap).to.be.equal(MAX_SUPPLY_CAP);
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
import { TestEnv, makeSuite } from './helpers/make-suite';
|
||||
import { APPROVAL_AMOUNT_LENDING_POOL, MAX_UINT_AMOUNT, RAY, MAX_BORROW_CAP } from '../../helpers/constants';
|
||||
import {
|
||||
APPROVAL_AMOUNT_LENDING_POOL,
|
||||
MAX_UINT_AMOUNT,
|
||||
RAY,
|
||||
MAX_BORROW_CAP,
|
||||
} from '../../helpers/constants';
|
||||
import { convertToCurrencyDecimals } from '../../helpers/contracts-helpers';
|
||||
import { ProtocolErrors } from '../../helpers/types';
|
||||
import { strategyWETH } from '../../markets/aave/reservesConfigs';
|
||||
|
@ -413,14 +418,14 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
expect(reserveFactor).to.be.equal(1000);
|
||||
});
|
||||
|
||||
it('Fails to change to too high borrowCap', async () => {
|
||||
it('Check that borrowCap cannot be set to value that exceeds the MAX_BORROW_CAP', async () => {
|
||||
const { configurator, users, weth } = testEnv;
|
||||
await expect(
|
||||
configurator.setBorrowCap(weth.address, BigNumber.from(MAX_BORROW_CAP).add(1)),
|
||||
CALLER_NOT_POOL_ADMIN
|
||||
).to.be.revertedWith(RC_INVALID_BORROW_CAP);
|
||||
});
|
||||
it('Fails to change to too high supplyCap', async () => {
|
||||
it('Check that supplyCap cannot be set to value that exceeds the MAX_SUPPLY_CAP', async () => {
|
||||
const { configurator, users, weth } = testEnv;
|
||||
await expect(
|
||||
configurator.setSupplyCap(weth.address, BigNumber.from(MAX_BORROW_CAP).add(1)),
|
||||
|
@ -457,7 +462,7 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
expect(supplyCap).to.be.equal(strategyWETH.supplyCap);
|
||||
});
|
||||
|
||||
it('Changes the borrow Cap of WETH', async () => {
|
||||
it('Changes the supply Cap of WETH', async () => {
|
||||
const { configurator, helpersContract, weth } = testEnv;
|
||||
await configurator.setSupplyCap(weth.address, '3000000');
|
||||
const {
|
||||
|
|
|
@ -180,7 +180,6 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
expect(liquidationBonus).to.be.equal(strategyWETH.liquidationBonus);
|
||||
expect(stableBorrowRateEnabled).to.be.equal(true /*strategyWETH.stableBorrowRateEnabled*/);
|
||||
expect(reserveFactor).to.be.equal(strategyWETH.reserveFactor);
|
||||
|
||||
expect(variableBorrowIndex.toString()).to.be.equal(RAY);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user