2021-05-06 14:08:43 +00:00
|
|
|
const { expect } = require("chai");
|
2021-05-07 21:55:21 +00:00
|
|
|
const { ethers } = require("hardhat");
|
2021-05-06 14:08:43 +00:00
|
|
|
|
|
|
|
describe("InstaCreamResolver", function () {
|
|
|
|
let cream;
|
|
|
|
let signer;
|
|
|
|
const CrUSDT = '0x797AAB1ce7c01eB727ab980762bA88e7133d2157';
|
|
|
|
|
|
|
|
it("should deploy the resolver", async function () {
|
|
|
|
[signer] = await ethers.getSigners();
|
|
|
|
|
|
|
|
const CreamFactory = await hre.ethers.getContractFactory("InstaCreamResolver");
|
|
|
|
cream = await CreamFactory.deploy();
|
|
|
|
await cream.deployed();
|
|
|
|
});
|
|
|
|
|
2021-05-07 21:55:21 +00:00
|
|
|
it("should fetch cream data for CrUSDT", async function () {
|
2021-05-06 14:08:43 +00:00
|
|
|
expect(await cream.getCreamData(signer.address, [CrUSDT])).to.exist;
|
|
|
|
});
|
2021-05-07 21:55:21 +00:00
|
|
|
|
|
|
|
it("should fetch cream position for CrUSDT", async function () {
|
|
|
|
const res = await cream.callStatic.getPosition(signer.address, [CrUSDT]);
|
|
|
|
expect(res).to.exist
|
|
|
|
});
|
2021-05-06 14:08:43 +00:00
|
|
|
});
|