cosmos-sdk/x/mint/module_test.go

30 lines
619 B
Go
Raw Normal View History

package mint_test
import (
"testing"
"github.com/cosmos/cosmos-sdk/x/mint"
"github.com/cosmos/cosmos-sdk/x/supply"
"github.com/stretchr/testify/assert"
"github.com/tendermint/tendermint/abci/types"
"github.com/cosmos/cosmos-sdk/simapp"
)
func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
app := simapp.Setup(false)
ctx := app.BaseApp.NewContext(false, types.Header{})
app.InitChain(
types.RequestInitChain{
AppStateBytes: []byte("{}"),
ChainId: "test-chain-id",
},
)
acc := app.AccountKeeper.GetAccount(ctx, supply.NewModuleAddress(mint.ModuleName))
assert.NotNil(t, acc)
}