gpu-compute-chain/x/colinear-core/keeper/grpc_query_params_test.go

23 lines
550 B
Go
Raw Normal View History

2022-08-25 16:51:14 -07:00
package keeper_test
import (
"testing"
testkeeper "colinear/testutil/keeper"
"colinear/x/colinear-core/types"
2022-08-25 16:51:14 -07:00
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
)
func TestParamsQuery(t *testing.T) {
keeper, ctx := testkeeper.ColinearcoreKeeper(t)
2022-08-25 16:51:14 -07:00
wctx := sdk.WrapSDKContext(ctx)
params := types.DefaultParams()
keeper.SetParams(ctx, params)
response, err := keeper.Params(wctx, &types.QueryParamsRequest{})
require.NoError(t, err)
require.Equal(t, &types.QueryParamsResponse{Params: params}, response)
}