cosmos-sdk/x/gov/module_test.go

28 lines
638 B
Go
Raw Normal View History

package gov_test
import (
"testing"
"github.com/stretchr/testify/require"
2020-06-13 02:07:51 -07:00
abcitypes "github.com/tendermint/tendermint/abci/types"
"github.com/cosmos/cosmos-sdk/simapp"
"github.com/cosmos/cosmos-sdk/x/auth"
2020-06-13 02:07:51 -07:00
"github.com/cosmos/cosmos-sdk/x/gov/types"
)
func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
app := simapp.Setup(false)
2020-06-13 02:07:51 -07:00
ctx := app.BaseApp.NewContext(false, abcitypes.Header{})
app.InitChain(
2020-06-13 02:07:51 -07:00
abcitypes.RequestInitChain{
AppStateBytes: []byte("{}"),
ChainId: "test-chain-id",
},
)
2020-06-13 02:07:51 -07:00
acc := app.AccountKeeper.GetAccount(ctx, auth.NewModuleAddress(types.ModuleName))
require.NotNil(t, acc)
}