cosmos-sdk/x/mint/module_test.go

28 lines
615 B
Go
Raw Normal View History

package mint_test
import (
"testing"
2020-03-05 07:15:53 -08:00
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/abci/types"
"github.com/cosmos/cosmos-sdk/simapp"
"github.com/cosmos/cosmos-sdk/x/auth"
2020-03-05 07:15:53 -08:00
"github.com/cosmos/cosmos-sdk/x/mint"
)
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, auth.NewModuleAddress(mint.ModuleName))
2020-03-05 07:15:53 -08:00
require.NotNil(t, acc)
}