cosmos-sdk/tests/integration/gov/module_test.go
Sai Kumar a4cf8e8c6f
feat(cli): cancel gov proposal by proposer before voting period ends (#13010)
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Marko <marbar3778@yahoo.com>
Closes https://github.com/cosmos/cosmos-sdk/issues/11554
2023-01-20 13:07:09 +00:00

38 lines
1.1 KiB
Go

package gov_test
import (
"testing"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"gotest.tools/v3/assert"
"github.com/cosmos/cosmos-sdk/testutil/configurator"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
_ "github.com/cosmos/cosmos-sdk/x/distribution"
"github.com/cosmos/cosmos-sdk/x/gov/types"
_ "github.com/cosmos/cosmos-sdk/x/mint"
)
func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
var accountKeeper authkeeper.AccountKeeper
app, err := simtestutil.SetupAtGenesis(
configurator.NewAppConfig(
configurator.ParamsModule(),
configurator.AuthModule(),
configurator.StakingModule(),
configurator.BankModule(),
configurator.GovModule(),
configurator.DistributionModule(),
configurator.ConsensusModule(),
),
&accountKeeper,
)
assert.NilError(t, err)
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
acc := accountKeeper.GetAccount(ctx, authtypes.NewModuleAddress(types.ModuleName))
assert.Assert(t, acc != nil)
}