cosmos-sdk/x/auth/module_test.go

28 lines
625 B
Go

package auth_test
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/abci/types"
"github.com/cosmos/cosmos-sdk/simapp"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/cosmos/cosmos-sdk/x/supply"
)
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(auth.FeeCollectorName))
require.NotNil(t, acc)
}