Skip to content

Commit

Permalink
Add test for StoreCode simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Dec 10, 2024
1 parent edc67b3 commit 17e3340
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions x/wasm/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,21 @@ var (
oldContract = mustLoad("./testdata/escrow_0.7.wasm")
)

func TestStoreCodeSimulation(t *testing.T) {
data := setupTest(t)
data.ctx = data.ctx.WithExecMode(sdk.ExecModeSimulate)

msg := &types.MsgStoreCode{
Sender: addr1,
WASMByteCode: testContract,
}

h := data.msgServiceRouter.Handler(msg)

_, err := h(data.ctx, msg)
require.NoError(t, err)
}

func TestHandleCreate(t *testing.T) {
cases := map[string]struct {
msg sdk.Msg
Expand Down

0 comments on commit 17e3340

Please sign in to comment.