add test case for PUT
@@ -44,6 +44,15 @@ func TestIntegration_FormParams(t *testing.T) {
expCT: `"Content-Type":["application/x-www-form-urlencoded"]`,
expErr: "form_params: method mismatch: DELETE",
},
+ {
+ file: "01_couper.hcl",
+ method: http.MethodPut,
+ ct: "application/x-www-form-urlencoded",
+ post: "x=X+1&x=X%202&y=Y",
+ expArgs: `"Args":{"x":["X 1","X 2"],"y":["Y"]}`,
+ expCT: `"Content-Type":["application/x-www-form-urlencoded"]`,
+ expErr: "form_params: method mismatch: PUT",
+ },
{
file: "01_couper.hcl",
method: http.MethodGet,
@@ -80,6 +89,15 @@ func TestIntegration_FormParams(t *testing.T) {
expCT: ``,
expErr: `form_params: method mismatch: DELETE`,
},
+ {
+ file: "01_couper.hcl",
+ method: http.MethodPut,
+ ct: "application/x-www-form-urlencoded",
+ post: "",
+ expArgs: ``,
+ expCT: ``,
+ expErr: `form_params: method mismatch: PUT`,
+ },
{
file: "03_couper.hcl",
method: http.MethodPost,
