From 61a117db05b8a805ea4739d4e0c4ed5e3ba6e1eb Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Tue, 25 Feb 2020 17:09:42 +0100 Subject: [PATCH] Add test label is properly stored --- x/wasm/internal/keeper/keeper_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/x/wasm/internal/keeper/keeper_test.go b/x/wasm/internal/keeper/keeper_test.go index d45dd96..6e13953 100644 --- a/x/wasm/internal/keeper/keeper_test.go +++ b/x/wasm/internal/keeper/keeper_test.go @@ -152,6 +152,14 @@ func TestInstantiate(t *testing.T) { gasAfter := ctx.GasMeter().GasConsumed() require.Equal(t, uint64(28936), gasAfter-gasBefore) + + // ensure it is stored properly + info := keeper.GetContractInfo(ctx, addr) + require.NotNil(t, info) + assert.Equal(t, info.Creator, creator) + assert.Equal(t, info.CodeID, contractID) + assert.Equal(t, info.InitMsg, json.RawMessage(initMsgBz)) + assert.Equal(t, info.Label, "demo contract 1") } func TestInstantiateWithNonExistingCodeID(t *testing.T) {