Skip to content

Commit cb91d77

Browse files
committed
Add test for StoreCode simulation
1 parent 4368bb9 commit cb91d77

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/integration/module_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,21 @@ var (
112112
oldContract = mustLoad("./testdata/escrow_0.7.wasm")
113113
)
114114

115+
func TestStoreCodeSimulation(t *testing.T) {
116+
data := setupTest(t)
117+
data.ctx = data.ctx.WithExecMode(sdk.ExecModeSimulate)
118+
119+
msg := &types.MsgStoreCode{
120+
Sender: addr1,
121+
WASMByteCode: testContract,
122+
}
123+
124+
h := data.msgServiceRouter.Handler(msg)
125+
126+
_, err := h(data.ctx, msg)
127+
require.NoError(t, err)
128+
}
129+
115130
func TestHandleCreate(t *testing.T) {
116131
cases := map[string]struct {
117132
msg sdk.Msg

0 commit comments

Comments
 (0)