Skip to content

Commit 18106b3

Browse files
committed
Update RequestMethodTests test to handle CONNECT
The CONNECT http method is primarily used for establishing tunnels and is not relevant for RequestMethod.
1 parent be8483d commit 18106b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-web/src/test/java/org/springframework/web/bind/annotation/RequestMethodTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ void resolveString() {
4141
@Test
4242
void resolveHttpMethod() {
4343
for (HttpMethod httpMethod : HttpMethod.values()) {
44+
if (HttpMethod.CONNECT.equals(httpMethod)) {
45+
assertThat(RequestMethod.resolve(httpMethod)).isNull();
46+
continue;
47+
}
4448
RequestMethod requestMethod = RequestMethod.resolve(httpMethod);
4549
assertThat(requestMethod).isNotNull();
4650
assertThat(requestMethod.name()).isEqualTo(httpMethod.name());

0 commit comments

Comments
 (0)