Skip to content

Commit

Permalink
Add in GetPoolRate test
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Dusek committed May 10, 2024
1 parent 4e44256 commit 132f8e6
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions x/market/keeper/rate_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package keeper_test

import (
"sort"
"strconv"
"strings"
"testing"

keepertest "github.com/pendulum-labs/market/testutil/keeper"
"github.com/stretchr/testify/require"
)

// Prevent strconv unused error
var _ = strconv.IntSize

func TestGetPoolRate(t *testing.T) {
keeper := keepertest.CreateTestEnvironment(t)
items := createNMember(keeper.MarketKeeper, keeper.Context, 10)
for _, item := range items {

pairArray := []string{item.DenomA, item.DenomB}
sort.Strings(pairArray)

pair := strings.Join(pairArray, ",")

_, _, error := keeper.MarketKeeper.GetPoolRate(
keeper.Context,
pair,
)

require.Nil(t, error)

}
}

0 comments on commit 132f8e6

Please sign in to comment.