mirror of
https://github.com/Fishwaldo/huma.git
synced 2025-03-15 11:21:42 +00:00
fix: Fix response test to add 499/ClientClosedRequest
This commit is contained in:
parent
97d385fd9b
commit
f4cd166ff5
1 changed files with 6 additions and 2 deletions
|
@ -46,7 +46,7 @@ var funcs = struct {
|
|||
},
|
||||
}
|
||||
|
||||
func TestResponses(t *testing.T) {
|
||||
func TestNesResponses(t *testing.T) {
|
||||
var status int
|
||||
response = func(s int) huma.Response {
|
||||
status = s
|
||||
|
@ -85,7 +85,11 @@ func TestResponses(t *testing.T) {
|
|||
http.StatusServiceUnavailable,
|
||||
http.StatusGatewayTimeout,
|
||||
} {
|
||||
table[strings.Replace(http.StatusText(s), " ", "", -1)] = s
|
||||
if s == 499 {
|
||||
table["ClientClosedRequest"] = s
|
||||
} else {
|
||||
table[strings.Replace(http.StatusText(s), " ", "", -1)] = s
|
||||
}
|
||||
}
|
||||
|
||||
for _, f := range funcs.Responses {
|
||||
|
|
Loading…
Add table
Reference in a new issue