mirror of
https://github.com/Instadapp/yield-contract.git
synced 2024-07-29 21:47:29 +00:00
Fixed testcases
This commit is contained in:
parent
e11f9553c7
commit
eb065ff386
|
@ -136,7 +136,7 @@ contract('DAI Pool', async accounts => {
|
|||
var amountInWei = (ether("1000")).toString()
|
||||
var checkAmt = (ether("90")).toString()
|
||||
await daiPoolInstance.withdraw(amountInWei, accounts[2], {from: userAddress});
|
||||
const daiBalance = await daiContract.methods.balanceOf(accounts[3]).call();
|
||||
const daiBalance = await daiContract.methods.balanceOf(accounts[2]).call();
|
||||
expect(new BN(daiBalance)).to.be.bignumber.least(checkAmt);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2,10 +2,8 @@ const { BN, ether, balance } = require('@openzeppelin/test-helpers');
|
|||
const { expect } = require('chai');
|
||||
|
||||
const RegistryContract = artifacts.require("Registry");
|
||||
const PoolTokenContract = artifacts.require("PoolToken");
|
||||
const PoolETHContract = artifacts.require("PoolETH");
|
||||
|
||||
const DaiRateLogic = artifacts.require("DaiRateLogic");
|
||||
const EthRateLogic = artifacts.require("EthRateLogic");
|
||||
|
||||
|
||||
|
@ -45,11 +43,11 @@ contract('ETH Pool', async accounts => {
|
|||
await addPool(registryInstance, ethPoolInstance.address, ethAddr);
|
||||
});
|
||||
|
||||
it('should enable DAI pool in registry', async () => {
|
||||
it('should enable ETH pool in registry', async () => {
|
||||
await enablePool(registryInstance, ethPoolInstance.address);
|
||||
});
|
||||
|
||||
it('should update DAI Logic contract in registry', async () => {
|
||||
it('should update ETH Logic contract in registry', async () => {
|
||||
await updateRateLogic(registryInstance, ethPoolInstance.address, ethRateLogicInstance.address);
|
||||
});
|
||||
|
||||
|
@ -92,7 +90,7 @@ contract('ETH Pool', async accounts => {
|
|||
it('should withdraw total ETH in ETH pool', async () => {
|
||||
var amountInWei = (ether("1000")).toString()
|
||||
var checkAmt = (ether("4.5")).toString()
|
||||
await ethPoolInstance.withdraw(amountInWei, accounts[3], {from: userAddress});
|
||||
await ethPoolInstance.withdraw(amountInWei, accounts[3], {from: accountA});
|
||||
const ethBalance = await web3.eth.getBalance(accounts[3]);
|
||||
expect(new BN(ethBalance)).to.be.bignumber.least(checkAmt);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user