cosmos-sdk/x/auth/module_test.go

24 lines
716 B
Go

package auth_test
import (
"testing"
"github.com/stretchr/testify/require"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
"github.com/cosmos/cosmos-sdk/x/auth/keeper"
"github.com/cosmos/cosmos-sdk/x/auth/testutil"
"github.com/cosmos/cosmos-sdk/x/auth/types"
)
func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
var accountKeeper keeper.AccountKeeper
app, err := simtestutil.SetupAtGenesis(testutil.AppConfig, &accountKeeper)
require.NoError(t, err)
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
acc := accountKeeper.GetAccount(ctx, types.NewModuleAddress(types.FeeCollectorName))
require.NotNil(t, acc)
}