Fixed test cases

This commit is contained in:
Thrilok Kumar 2020-08-22 09:32:46 +05:30
parent 321b66a861
commit baaaf4ad88
2 changed files with 12 additions and 3 deletions

View File

@ -4,5 +4,11 @@ pragma experimental ABIEncoderV2;
import { CurveGaugeMapping } from "../mapping/curve_gauge_mapping.sol";
contract MockCurveGaugeMapping is CurveGaugeMapping {
constructor(
string[] memory gaugeNames,
address[] memory gaugeAddresses,
bool[] memory rewardTokens
) public CurveGaugeMapping(gaugeNames, gaugeAddresses, rewardTokens) {
}
modifier isChief override {_;}
}

View File

@ -18,7 +18,10 @@ contract("ConnectCurveGauge", async accounts => {
before(async function () {
mock = await MockContract.new();
mockCurveGaugeMapping = await MockCurveGaugeMapping.new();
let names = ["compound", "susd"]
let poolAddress = [mock.address, mock.address]
let rewardArr = [false, true]
mockCurveGaugeMapping = await MockCurveGaugeMapping.new(names, poolAddress, rewardArr);
mockCurveGauge = await MockCurveGauge.new(mock.address, mockCurveGaugeMapping.address);
// lp_token = new web3.eth.Contract(erc20ABI, mock.address);
curveGauge = new web3.eth.Contract(gaugeABI, mock.address)
@ -32,8 +35,8 @@ contract("ConnectCurveGauge", async accounts => {
let rewarded_token = await curveGauge.methods.rewarded_token().encodeABI();
await mock.givenMethodReturnAddress(rewarded_token, mock.address);
await mockCurveGaugeMapping.addGaugeMapping('compound', mock.address, false);
await mockCurveGaugeMapping.addGaugeMapping('susd', mock.address, true);
// await mockCurveGaugeMapping.addGaugeMapping('compound', mock.address, false);
// await mockCurveGaugeMapping.addGaugeMapping('susd', mock.address, true);
})
it('can deposit into compound gauge', async function() {