now it creates the module account on InitChain
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package mint_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/x/mint"
|
||||
"github.com/cosmos/cosmos-sdk/x/supply"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/simapp"
|
||||
)
|
||||
|
||||
func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
|
||||
app := simapp.Setup(false)
|
||||
ctx := app.BaseApp.NewContext(false, types.Header{})
|
||||
|
||||
app.InitChain(
|
||||
types.RequestInitChain{
|
||||
AppStateBytes: []byte("{}"),
|
||||
ChainId: "test-chain-id",
|
||||
},
|
||||
)
|
||||
|
||||
acc := app.AccountKeeper.GetAccount(ctx, supply.NewModuleAddress(mint.ModuleName))
|
||||
|
||||
assert.NotNil(t, acc)
|
||||
}
|
||||
Reference in New Issue
Block a user