Commit c38630af authored by Taylor Gerring's avatar Taylor Gerring

Test blockHeightFromJsonInvalid

parent e0781c25
......@@ -1680,3 +1680,12 @@ func TestSubmitWorkArgsDigestInt(t *testing.T) {
t.Error(str)
}
}
func TestBlockHeightFromJsonInvalid(t *testing.T) {
var num int64
var msg json.RawMessage = []byte(`}{`)
str := ExpectDecodeParamError(blockHeightFromJson(msg, &num))
if len(str) > 0 {
t.Error(str)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment