Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
shahthepro committed Sep 26, 2024
1 parent 696beb8 commit 852ef4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contracts/test/dripper/fixed-rate-dripper.base.fork-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ describe("ForkTest: OETHb FixedRateDripper", function () {
const oneDay = 24 * 60 * 60;
await advanceTime(oneDay); // 1d

const pendingTime = BigNumber.from(currTimestamp)
const elapsedTime = BigNumber.from(currTimestamp)
.sub(drip.lastCollect)
.add(oneDay);
const expectedRewards = pendingTime.mul(drip.perSecond);
const expectedRewards = elapsedTime.mul(drip.perSecond);

// Do a collect
await dripper.collect();
Expand All @@ -53,6 +53,8 @@ describe("ForkTest: OETHb FixedRateDripper", function () {
// Make sure drip rate hasn't changed
const dripAfter = await dripper.drip();
expect(dripAfter.perSecond).to.eq(drip.perSecond);
// ... and lastCollect has been updated
expect(dripAfter.lastCollect).to.gte(drip.lastCollect.add(elapsedTime));
});

it("Should allow strategist/governor to change rate", async () => {
Expand Down

0 comments on commit 852ef4e

Please sign in to comment.