Test json: add a check with invalid json (no parameter is parsed)
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Adrien Marquès 2019-11-19 17:00:11 +01:00
parent 0a470dbd40
commit a54c428670
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"}, ParamNames: []string{"a", "URL#injection"},
ParamValues: []interface{}{"b", nil}, ParamValues: []interface{}{"b", nil},
}, },
// json parse error
{
RawJson: "{ \"a\": \"b\", }",
InvalidNames: []string{},
ParamNames: []string{},
ParamValues: []interface{}{},
},
} }
for i, test := range tests { for i, test := range tests {