planetmint-go/x/asset/genesis_test.go
Julian Strobl d4eed021c8
[go.mod] Switch module to github.com (#86)
This is the quasi-standard and fixes the error below:

```
$ go get -u github.com/planetmint/planetmint-go@v0.1.0
go: github.com/planetmint/planetmint-go@v0.1.0: parsing go.mod:
        module declares its path as: planetmint-go
                but was required as: github.com/planetmint/planetmint-go
```

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-09-21 17:37:57 +02:00

30 lines
741 B
Go

package asset_test
import (
"testing"
keepertest "github.com/planetmint/planetmint-go/testutil/keeper"
"github.com/planetmint/planetmint-go/testutil/nullify"
"github.com/planetmint/planetmint-go/x/asset"
"github.com/planetmint/planetmint-go/x/asset/types"
"github.com/stretchr/testify/require"
)
func TestGenesis(t *testing.T) {
genesisState := types.GenesisState{
Params: types.DefaultParams(),
// this line is used by starport scaffolding # genesis/test/state
}
k, ctx := keepertest.AssetKeeper(t)
asset.InitGenesis(ctx, *k, genesisState)
got := asset.ExportGenesis(ctx, *k)
require.NotNil(t, got)
nullify.Fill(&genesisState)
nullify.Fill(got)
// this line is used by starport scaffolding # genesis/test/assert
}