22 lines
550 B
Go
22 lines
550 B
Go
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)
|
|
}
|