Skip to content

Commit

Permalink
Update prefix header tests to allow for empty headers (#2415)
Browse files Browse the repository at this point in the history
  • Loading branch information
Madrigal authored Oct 4, 2024
1 parent f630cbb commit e5d83ed
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ apply HttpPrefixHeaders @httpRequestTests([
},
{
id: "RestJsonHttpPrefixHeadersAreNotPresent",
documentation: "No prefix headers are serialized because the value is empty",
documentation: "No prefix headers are serialized because the value is not present",
protocol: restJson1,
method: "GET",
uri: "/HttpPrefixHeaders",
Expand All @@ -56,6 +56,23 @@ apply HttpPrefixHeaders @httpRequestTests([
},
appliesTo: "client"
},
{
id: "RestJsonHttpPrefixEmptyHeaders",
documentation: "Serialize prefix headers were the value is present but empty"
protocol: restJson1,
method: "GET",
uri: "/HttpPrefixHeaders",
body: "",
params: {
fooMap: {
Abc: ""
}
},
headers: {
"X-Foo-Abc": ""
}
appliesTo: "client",
},
])

apply HttpPrefixHeaders @httpResponseTests([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ apply HttpPrefixHeaders @httpRequestTests([
},
{
id: "HttpPrefixHeadersAreNotPresent",
documentation: "No prefix headers are serialized because the value is empty",
documentation: "No prefix headers are serialized because the value is not present",
protocol: restXml,
method: "GET",
uri: "/HttpPrefixHeaders",
Expand All @@ -55,6 +55,23 @@ apply HttpPrefixHeaders @httpRequestTests([
},
appliesTo: "client"
},
{
id: "HttpPrefixEmptyHeaders",
documentation: "Serialize prefix headers were the value is present but empty"
protocol: restXml,
method: "GET",
uri: "/HttpPrefixHeaders",
body: "",
params: {
fooMap: {
Abc: ""
}
},
headers: {
"X-Foo-Abc": ""
}
appliesTo: "client",
},
])

apply HttpPrefixHeaders @httpResponseTests([
Expand Down

0 comments on commit e5d83ed

Please sign in to comment.