Skip to content

Commit

Permalink
Fix DSR test
Browse files Browse the repository at this point in the history
  • Loading branch information
shahthepro committed Apr 24, 2024
1 parent 9500964 commit bc8ed47
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions contracts/test/strategies/ousd-maker-dsr.fork-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,15 @@ describe("ForkTest: Maker DSR Strategy", function () {
fixture = await loadFixture();
});
it("Vault should deposit some DAI to strategy", async function () {
const { dai, ousd, sDAI, makerDsrStrategy, vaultSigner } = fixture;
const {
dai,
ousd,
sDAI,
makerDsrStrategy,
vault,
strategist,
vaultSigner,
} = fixture;

const daiDepositAmount = await units("1000", dai);

Expand All @@ -106,6 +114,8 @@ describe("ForkTest: Maker DSR Strategy", function () {
.connect(vaultSigner)
.transfer(makerDsrStrategy.address, daiDepositAmount);

await vault.connect(strategist).rebase();

const ousdSupplyBefore = await ousd.totalSupply();

log(
Expand All @@ -129,7 +139,7 @@ describe("ForkTest: Maker DSR Strategy", function () {
const ousdSupplyAfter = await ousd.totalSupply();
expect(ousdSupplyAfter).to.approxEqualTolerance(
ousdSupplyBefore.add(daiDepositAmount),
0.01 // 0.01% or 1 basis point
0.1 // 0.1% or 10 basis point
);
});
it("Only vault can deposit some DAI to the strategy", async function () {
Expand Down

0 comments on commit bc8ed47

Please sign in to comment.