gpu-compute-chain/x/cosmostest/keeper/grpc_query_params_test.go

22 lines
550 B
Go
Raw Normal View History

2022-08-25 16:51:14 -07:00
package keeper_test
import (
"testing"
testkeeper "cosmos-test/testutil/keeper"
"cosmos-test/x/cosmostest/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
)
func TestParamsQuery(t *testing.T) {
keeper, ctx := testkeeper.CosmostestKeeper(t)
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)
}