cosmos-sdk/tests/integration/auth/keeper/module_test.go
mergify[bot] 33d8838df7
test: migrate remaining e2e tests to integration tests (backport #22364) (#22381)
Co-authored-by: Akhil Kumar P <36399231+akhilkumarpilli@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2024-10-27 23:56:35 +01:00

31 lines
776 B
Go

package keeper_test
import (
"testing"
"github.com/stretchr/testify/require"
"cosmossdk.io/depinject"
"cosmossdk.io/log"
authTest "github.com/cosmos/cosmos-sdk/tests/integration/auth/keeper"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
"github.com/cosmos/cosmos-sdk/x/auth/keeper"
"github.com/cosmos/cosmos-sdk/x/auth/types"
)
func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
var accountKeeper keeper.AccountKeeper
app, err := simtestutil.SetupAtGenesis(
depinject.Configs(
authTest.AppConfig,
depinject.Supply(log.NewNopLogger()),
),
&accountKeeper)
require.NoError(t, err)
ctx := app.BaseApp.NewContext(false)
acc := accountKeeper.GetAccount(ctx, types.NewModuleAddress(types.FeeCollectorName))
require.NotNil(t, acc)
}