Browse Source

Add missing StatusResultMatcher for HTTP Status 451

Issue: SPR-13632
pull/946/head
Brian Clozel 9 years ago
parent
commit
74d3bceb19
  1. 9
      spring-test/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java

9
spring-test/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java

@ -33,6 +33,7 @@ import static org.springframework.test.util.AssertionErrors.*;
* @author Keesun Baik * @author Keesun Baik
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @author Sebastien Deleuze * @author Sebastien Deleuze
* @author Brian Clozel
* @since 3.2 * @since 3.2
*/ */
public class StatusResultMatchers { public class StatusResultMatchers {
@ -561,6 +562,14 @@ public class StatusResultMatchers {
return matcher(HttpStatus.valueOf(431)); return matcher(HttpStatus.valueOf(431));
} }
/**
* Assert the response status code is {@code HttpStatus.UNAVAILABLE_FOR_LEGAL_REASONS} (451).
* @since 4.3
*/
public ResultMatcher isUnavailableForLegalReasons() {
return matcher(HttpStatus.valueOf(451));
}
/** /**
* Assert the response status code is {@code HttpStatus.INTERNAL_SERVER_ERROR} (500). * Assert the response status code is {@code HttpStatus.INTERNAL_SERVER_ERROR} (500).
*/ */

Loading…
Cancel
Save