mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-05-11 18:29:51 +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>
31 lines
767 B
Go
31 lines
767 B
Go
package machine_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
keepertest "github.com/planetmint/planetmint-go/testutil/keeper"
|
|
"github.com/planetmint/planetmint-go/testutil/nullify"
|
|
"github.com/planetmint/planetmint-go/x/machine"
|
|
"github.com/planetmint/planetmint-go/x/machine/types"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestGenesis(t *testing.T) {
|
|
t.Parallel()
|
|
genesisState := types.GenesisState{
|
|
Params: types.DefaultParams(),
|
|
|
|
// this line is used by starport scaffolding # genesis/test/state
|
|
}
|
|
|
|
k, ctx := keepertest.MachineKeeper(t)
|
|
machine.InitGenesis(ctx, *k, genesisState)
|
|
got := machine.ExportGenesis(ctx, *k)
|
|
require.NotNil(t, got)
|
|
|
|
nullify.Fill(&genesisState)
|
|
nullify.Fill(got)
|
|
|
|
// this line is used by starport scaffolding # genesis/test/assert
|
|
}
|