Add test label is properly stored

This commit is contained in:
Ethan Frey 2020-02-25 17:09:42 +01:00
parent ba53b8a9c9
commit 61a117db05
1 changed files with 8 additions and 0 deletions

View File

@ -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) {