mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-11 16:14:52 +00:00
add: additional test for invalid json payload
This commit is contained in:
parent
1cdbd7e6ad
commit
14ec47b214
1 changed files with 1 additions and 0 deletions
|
@ -15,6 +15,7 @@ var parseJSONPayloadTests = []struct {
|
|||
{[]byte(` [1,2,3]`), map[string]interface{}{"root": []interface{}{json.Number("1"), json.Number("2"), json.Number("3")}}, true},
|
||||
{[]byte(`{"key": "value"}`), map[string]interface{}{"key": "value"}, true},
|
||||
{[]byte(`[1, {"]`), map[string]interface{}(nil), false},
|
||||
{[]byte(`{"key": "value}`), map[string]interface{}(nil), false},
|
||||
}
|
||||
|
||||
func TestParseJSONPayload(t *testing.T) {
|
||||
|
|
Loading…
Add table
Reference in a new issue