cosmos-sdk/x/mint/keeper/integration_test.go

21 lines
577 B
Go
Raw Normal View History

2019-08-15 06:53:37 -07:00
package keeper_test
import (
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
2019-08-15 06:53:37 -07:00
"github.com/cosmos/cosmos-sdk/simapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/mint/types"
2019-08-15 06:53:37 -07:00
)
// returns context and an app with updated mint keeper
func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) {
app := simapp.Setup(isCheckTx)
ctx := app.BaseApp.NewContext(isCheckTx, tmproto.Header{})
2019-08-15 06:53:37 -07:00
app.MintKeeper.SetParams(ctx, types.DefaultParams())
app.MintKeeper.SetMinter(ctx, types.DefaultInitialMinter())
return app, ctx
}