Skip to content

Commit

Permalink
fixed small edge case in tests of v5.0.9 for older Go versions
Browse files Browse the repository at this point in the history
  • Loading branch information
pkieltyka committed Jul 13, 2023
1 parent cfd6c46 commit 12e9322
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,9 @@ func TestMethodNotAllowed(t *testing.T) {
t.Fatal(resp.Status)
}
allowedMethods := resp.Header.Values("Allow")
if len(allowedMethods) != 2 || allowedMethods[0] != "GET" || allowedMethods[1] != "HEAD" {
if len(allowedMethods) != 2 || ((allowedMethods[0] != "GET" || allowedMethods[1] != "HEAD") &&
(allowedMethods[1] != "GET" || allowedMethods[0] != "HEAD")) {
t.Fatal("Allow header should contain 2 headers: GET, HEAD. Received: ", allowedMethods)

}
})
}
Expand Down

0 comments on commit 12e9322

Please sign in to comment.