github.com/cosmos/cosmos-sdk@v0.50.10/x/auth/module_test.go (about)

     1  package auth_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  
     8  	"cosmossdk.io/depinject"
     9  	"cosmossdk.io/log"
    10  
    11  	simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
    12  	"github.com/cosmos/cosmos-sdk/x/auth/keeper"
    13  	"github.com/cosmos/cosmos-sdk/x/auth/testutil"
    14  	"github.com/cosmos/cosmos-sdk/x/auth/types"
    15  )
    16  
    17  func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
    18  	var accountKeeper keeper.AccountKeeper
    19  	app, err := simtestutil.SetupAtGenesis(
    20  		depinject.Configs(
    21  			testutil.AppConfig,
    22  			depinject.Supply(log.NewNopLogger()),
    23  		),
    24  		&accountKeeper)
    25  	require.NoError(t, err)
    26  
    27  	ctx := app.BaseApp.NewContext(false)
    28  	acc := accountKeeper.GetAccount(ctx, types.NewModuleAddress(types.FeeCollectorName))
    29  	require.NotNil(t, acc)
    30  }