mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-11-27 07:48:29 +00:00
* add MintAddress to params.proto * ignite scaffold message update-params params:Params --module dao * add dao get and set params * make dao.MsgUpdateParams.Params non-nullable * use GetMintAddress in ante handler * adjust dao e2e test suit for mint address param * change msg creator to authority and set gov module as default in gov proposal * fix staticcheck error * remove depricated config param * fix linter errors Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
22 lines
588 B
Go
22 lines
588 B
Go
package keeper_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
testkeeper "github.com/planetmint/planetmint-go/testutil/keeper"
|
|
"github.com/planetmint/planetmint-go/x/dao/types"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestParamsQuery(t *testing.T) {
|
|
keeper, ctx := testkeeper.DaoKeeper(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)
|
|
}
|