summaryrefslogtreecommitdiff
path: root/plugins/http
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-30 18:20:55 +0300
committerValery Piashchynski <[email protected]>2020-11-30 18:20:55 +0300
commitb9ddb1069352e36f97b1b9a4279d38e18329207a (patch)
tree4059cf2833c2169f6430edb60ad733c096499ad2 /plugins/http
parent0a5116e9dcce76c8f845f4fdda41d448f3e38955 (diff)
PHP 8.0 in RR2
Diffstat (limited to 'plugins/http')
-rw-r--r--plugins/http/tests/handler_test.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/http/tests/handler_test.go b/plugins/http/tests/handler_test.go
index b898c265..0c6a39ef 100644
--- a/plugins/http/tests/handler_test.go
+++ b/plugins/http/tests/handler_test.go
@@ -614,8 +614,15 @@ func TestHandler_FormData_POST_Overwrite(t *testing.T) {
form := url.Values{}
- form.Add("key", "value1")
+ form.Add("key", "value")
form.Add("key", "value2")
+ form.Add("name[]", "name1")
+ form.Add("name[]", "name2")
+ form.Add("name[]", "name3")
+ form.Add("arr[x][y][z]", "y")
+ form.Add("arr[x][y][e]", "f")
+ form.Add("arr[c]p", "l")
+ form.Add("arr[c]z", "")
req, err := http.NewRequest("POST", "http://localhost"+hs.Addr, strings.NewReader(form.Encode()))
assert.NoError(t, err)
@@ -637,7 +644,7 @@ func TestHandler_FormData_POST_Overwrite(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, 200, r.StatusCode)
- assert.Equal(t, `{"key":"value2","arr":{"x":{"y":null}}}`, string(b))
+ assert.Equal(t, `{"arr":{"c":{"p":"l","z":""},"x":{"y":{"e":"f","z":"y"}}},"key":"value2","name":["name1","name2","name3"]}`, string(b))
}
func TestHandler_FormData_POST_Form_UrlEncoded_Charset(t *testing.T) {