mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
Fixed test cases
This commit is contained in:
parent
321b66a861
commit
baaaf4ad88
|
@ -4,5 +4,11 @@ pragma experimental ABIEncoderV2;
|
||||||
import { CurveGaugeMapping } from "../mapping/curve_gauge_mapping.sol";
|
import { CurveGaugeMapping } from "../mapping/curve_gauge_mapping.sol";
|
||||||
|
|
||||||
contract MockCurveGaugeMapping is CurveGaugeMapping {
|
contract MockCurveGaugeMapping is CurveGaugeMapping {
|
||||||
|
constructor(
|
||||||
|
string[] memory gaugeNames,
|
||||||
|
address[] memory gaugeAddresses,
|
||||||
|
bool[] memory rewardTokens
|
||||||
|
) public CurveGaugeMapping(gaugeNames, gaugeAddresses, rewardTokens) {
|
||||||
|
}
|
||||||
modifier isChief override {_;}
|
modifier isChief override {_;}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,10 @@ contract("ConnectCurveGauge", async accounts => {
|
||||||
|
|
||||||
before(async function () {
|
before(async function () {
|
||||||
mock = await MockContract.new();
|
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);
|
mockCurveGauge = await MockCurveGauge.new(mock.address, mockCurveGaugeMapping.address);
|
||||||
// lp_token = new web3.eth.Contract(erc20ABI, mock.address);
|
// lp_token = new web3.eth.Contract(erc20ABI, mock.address);
|
||||||
curveGauge = new web3.eth.Contract(gaugeABI, 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();
|
let rewarded_token = await curveGauge.methods.rewarded_token().encodeABI();
|
||||||
await mock.givenMethodReturnAddress(rewarded_token, mock.address);
|
await mock.givenMethodReturnAddress(rewarded_token, mock.address);
|
||||||
|
|
||||||
await mockCurveGaugeMapping.addGaugeMapping('compound', mock.address, false);
|
// await mockCurveGaugeMapping.addGaugeMapping('compound', mock.address, false);
|
||||||
await mockCurveGaugeMapping.addGaugeMapping('susd', mock.address, true);
|
// await mockCurveGaugeMapping.addGaugeMapping('susd', mock.address, true);
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can deposit into compound gauge', async function() {
|
it('can deposit into compound gauge', async function() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user