Skip to content

Commit b905be6

Browse files
committed
adding unit test cases
1 parent c87dbd5 commit b905be6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

x/stablestake/keeper/debt_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,22 @@ func (suite *KeeperTestSuite) TestMove() {
160160
interests := suite.app.StablestakeKeeper.GetAllInterest(suite.ctx)
161161
suite.Require().Len(interests, 0)
162162
}
163+
164+
func (suite *KeeperTestSuite) TestGetInterestAtHeight() {
165+
i := types.InterestBlock{
166+
InterestRate: math.LegacyNewDec(2),
167+
BlockTime: 100,
168+
BlockHeight: 1,
169+
PoolId: 1,
170+
}
171+
suite.app.StablestakeKeeper.SetInterestForPool(suite.ctx, 1, 1, i)
172+
interestBlock := suite.app.StablestakeKeeper.GetInterestAtHeight(suite.ctx, 1, 1)
173+
suite.Equal(i.InterestRate, interestBlock.InterestRate)
174+
suite.Equal(i.BlockTime, interestBlock.BlockTime)
175+
suite.Equal(i.BlockHeight, interestBlock.BlockHeight)
176+
suite.Equal(i.PoolId, interestBlock.PoolId)
177+
}
178+
179+
func (suite *KeeperTestSuite) TestTestnetMigrate() {
180+
suite.app.StablestakeKeeper.TestnetMigrate(suite.ctx)
181+
}

0 commit comments

Comments
 (0)