Skip to content

Commit 12e9322

Browse files
committed
fixed small edge case in tests of v5.0.9 for older Go versions
1 parent cfd6c46 commit 12e9322

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mux_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,9 @@ func TestMethodNotAllowed(t *testing.T) {
422422
t.Fatal(resp.Status)
423423
}
424424
allowedMethods := resp.Header.Values("Allow")
425-
if len(allowedMethods) != 2 || allowedMethods[0] != "GET" || allowedMethods[1] != "HEAD" {
425+
if len(allowedMethods) != 2 || ((allowedMethods[0] != "GET" || allowedMethods[1] != "HEAD") &&
426+
(allowedMethods[1] != "GET" || allowedMethods[0] != "HEAD")) {
426427
t.Fatal("Allow header should contain 2 headers: GET, HEAD. Received: ", allowedMethods)
427-
428428
}
429429
})
430430
}

0 commit comments

Comments
 (0)