d28ef888ff
* WIP : added bond module tx and query cli commands * added bond module invariant * update the go.mod * addressed the pr changes * update to proto files * refactor: move the proto package version from `v1` to `v1beta1` for vulcanize modules * WIP : addin the unit test scripts to bond module * refactor: refactored the test cases for bond module * refactor: refactored the bond module test cases 1. refactored grpc gateway endpoints of bond module 2. added test cases to cli query , cli tx and grpc end points * addressed the pr comments 1. changed query-by-owner to by-owner in cli cmd 2. changed bonds-by-owner route to by-owner in bond module
24 lines
652 B
Go
24 lines
652 B
Go
package bond_test
|
|
|
|
import (
|
|
"github.com/stretchr/testify/require"
|
|
abcitypes "github.com/tendermint/tendermint/abci/types"
|
|
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
|
app2 "github.com/tharsis/ethermint/app"
|
|
bondtypes "github.com/tharsis/ethermint/x/bond/types"
|
|
"testing"
|
|
)
|
|
|
|
func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
|
|
app := app2.Setup(false)
|
|
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
|
|
|
app.InitChain(abcitypes.RequestInitChain{
|
|
AppStateBytes: []byte("{}"),
|
|
ChainId: "test-chain-id",
|
|
})
|
|
|
|
acc := app.AccountKeeper.GetModuleAccount(ctx, bondtypes.ModuleName)
|
|
require.NotNil(t, acc)
|
|
}
|