Test json: add a check with invalid json (no parameter is parsed)

This commit is contained in:
Adrien Marquès 2019-11-19 17:00:11 +01:00
parent 5f1d76a0a8
commit d1d581bd75
Signed by: xdrm-brackets
GPG Key ID: D75243CA236D825E
1 changed files with 7 additions and 0 deletions

View File

@ -463,6 +463,13 @@ func TestJsonParameters(t *testing.T) {
ParamNames: []string{"a", "URL#injection"},
ParamValues: []interface{}{"b", nil},
},
// json parse error
{
RawJson: "{ \"a\": \"b\", }",
InvalidNames: []string{},
ParamNames: []string{},
ParamValues: []interface{}{},
},
}
for i, test := range tests {