Skip to content

Commit

Permalink
fix rtoken tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmckelvy1 committed Aug 2, 2023
1 parent 0d70765 commit 8629e86
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/RToken.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ describe(`RTokenP${IMPLEMENTATION} contract`, () => {
await Promise.all(
tokens.map((t) => t.connect(addr1).approve(rToken.address, MAX_THROTTLE_AMT_RATE))
)
// advance time
await advanceTime(12 * 5 * 60) // 60 minutes, charge fully
await rToken.connect(addr1).issue(MAX_THROTTLE_AMT_RATE)
expect(await rToken.totalSupply()).to.equal(MAX_THROTTLE_AMT_RATE)
expect(await rToken.basketsNeeded()).to.equal(MAX_THROTTLE_AMT_RATE)
Expand Down Expand Up @@ -1414,6 +1416,9 @@ describe(`RTokenP${IMPLEMENTATION} contract`, () => {
redemptionThrottleParams.pctRate = bn(0)
await rToken.connect(owner).setRedemptionThrottleParams(redemptionThrottleParams)

// advance time
await advanceTime(12 * 5 * 60) // 60 minutes, charge fully

// Check redemption throttle
expect(await rToken.redemptionAvailable()).to.equal(redemptionThrottleParams.amtRate)

Expand Down Expand Up @@ -2227,6 +2232,9 @@ describe(`RTokenP${IMPLEMENTATION} contract`, () => {
redemptionThrottleParams.pctRate = bn(0)
await rToken.connect(owner).setRedemptionThrottleParams(redemptionThrottleParams)

// advance time
await advanceTime(12 * 5 * 60) // 60 minutes, charge fully

// Check redemption throttle
expect(await rToken.redemptionAvailable()).to.equal(redemptionThrottleParams.amtRate)

Expand Down

0 comments on commit 8629e86

Please sign in to comment.