mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-03-30 15:08:28 +00:00

* [linter] Add `musttag` Enforce field tags in (un)marshaled structs. * [linter] Add `nestif` Reports deeply nested if statements. * [linter] Add `noctx` Finds sending http request without context.Context. * [linter] Add `paralleltest` Paralleltest detects missing usage of t.Parallel() method in your Go test. * [linter] Add `tagalign` Check that struct tags are well aligned. * [linter] Add `tagliatelle` Checks the struct tags. * [linter] Add `whitespace` Tool for detection of leading and trailing whitespace. * [paralleltest] Exclude files bc of data race in tests Signed-off-by: Julian Strobl <jmastr@mailbox.org>
23 lines
602 B
Go
23 lines
602 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/asset/types"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestParamsQuery(t *testing.T) {
|
|
t.Parallel()
|
|
keeper, ctx := testkeeper.AssetKeeper(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)
|
|
}
|