cosmos-sdk/x/staking/module_test.go
dauTT 14e3aa1265
x/staking: remove alias.go usage (#6397)
* x/staking: remove alias.go usage

* Fix formatting and Add entry in CHANGELOG.md

* Add missing end curly parenthesis

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-12 14:54:37 +00:00

31 lines
764 B
Go

package staking_test
import (
"testing"
"github.com/stretchr/testify/require"
abcitypes "github.com/tendermint/tendermint/abci/types"
"github.com/cosmos/cosmos-sdk/simapp"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/cosmos/cosmos-sdk/x/staking/types"
)
func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
app := simapp.Setup(false)
ctx := app.BaseApp.NewContext(false, abcitypes.Header{})
app.InitChain(
abcitypes.RequestInitChain{
AppStateBytes: []byte("{}"),
ChainId: "test-chain-id",
},
)
acc := app.AccountKeeper.GetAccount(ctx, auth.NewModuleAddress(types.BondedPoolName))
require.NotNil(t, acc)
acc = app.AccountKeeper.GetAccount(ctx, auth.NewModuleAddress(types.NotBondedPoolName))
require.NotNil(t, acc)
}