github.com/Finschia/finschia-sdk@v0.49.1/x/auth/module_test.go (about)

     1  package auth_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  	abci "github.com/tendermint/tendermint/abci/types"
     8  	tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
     9  
    10  	"github.com/Finschia/finschia-sdk/simapp"
    11  	"github.com/Finschia/finschia-sdk/x/auth/types"
    12  )
    13  
    14  func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
    15  	app := simapp.Setup(false)
    16  	ctx := app.BaseApp.NewContext(false, tmproto.Header{})
    17  
    18  	app.InitChain(
    19  		abci.RequestInitChain{
    20  			AppStateBytes: []byte("{}"),
    21  			ChainId:       "test-chain-id",
    22  		},
    23  	)
    24  
    25  	acc := app.AccountKeeper.GetAccount(ctx, types.NewModuleAddress(types.FeeCollectorName))
    26  	require.NotNil(t, acc)
    27  }