Skip to content

Commit

Permalink
alter client test due to liquidation ineligibility
Browse files Browse the repository at this point in the history
  • Loading branch information
toteki committed Mar 28, 2023
1 parent 8b3a35d commit d19e73e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion x/leverage/client/tests/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ func (t testQuery) Run(s *IntegrationTestSuite) {

err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), t.responseType)
require.NoError(err, t.msg)
require.Equal(t.expectedResponse, t.responseType, t.msg)
require.Equal(t.expectedResponse.String(), t.responseType.String(), t.msg)
}
}
10 changes: 5 additions & 5 deletions x/leverage/client/tests/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,17 +230,17 @@ func (s *IntegrationTestSuite) TestLeverageScenario() {
cli.GetCmdLiquidate(),
[]string{
val.Address.String(),
"5uumee", // borrower liquidates itself, reduces borrow amount and collateral by 5
"5uumee", // borrower attempts to liquidate itself, but is ineligible
"uumee",
},
nil,
types.ErrLiquidationIneligible,
}

repay := testTransaction{
"repay",
cli.GetCmdRepay(),
[]string{
"250uumee", // repays only the remaining borrowed balance, reduced automatically from 250
"255uumee", // repays only the remaining borrowed balance, reduced automatically from 255
},
nil,
}
Expand All @@ -249,7 +249,7 @@ func (s *IntegrationTestSuite) TestLeverageScenario() {
"remove collateral",
cli.GetCmdDecollateralize(),
[]string{
"895u/uumee", // 100 u/uumee will remain
"900u/uumee", // 100 u/uumee will remain
},
nil,
}
Expand All @@ -258,7 +258,7 @@ func (s *IntegrationTestSuite) TestLeverageScenario() {
"withdraw",
cli.GetCmdWithdraw(),
[]string{
"795u/uumee", // 200 u/uumee will remain
"800u/uumee", // 200 u/uumee will remain
},
nil,
}
Expand Down

0 comments on commit d19e73e

Please sign in to comment.