Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
toteki committed Aug 6, 2023
1 parent aae0270 commit 2106201
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion x/leverage/types/position_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,37 @@ func TestMaxBorrow(t *testing.T) {
coin.Dec("AAAA", "100"),
),
sdk.NewDecCoins(),
// collateral weight 0.1, should be able to borrow 100 A
// collateral weight 0.1, should be able to borrow 10 A
"AAAA",
"10.00",
"simple A max(A)",
},
{
// single asset, with existing looped borrow
sdk.NewDecCoins(
coin.Dec("AAAA", "100"),
),
sdk.NewDecCoins(
coin.Dec("AAAA", "5"),
),
// collateral weight 0.1, should be able to borrow 10 total
"AAAA",
"5.00",
"simple A->A max(A)",
},
{
// single asset, with existing borrow
sdk.NewDecCoins(
coin.Dec("AAAA", "100"),
),
sdk.NewDecCoins(
coin.Dec("IIII", "5"),
),
// collateral weight 0.1, should be able to borrow 10 total
"AAAA",
"5.00",
"simple A->I max(A)",
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 2106201

Please sign in to comment.