mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Add missing StatusResultMatcher for HTTP Status 451
Issue: SPR-13632
This commit is contained in:
+9
@@ -33,6 +33,7 @@ import static org.springframework.test.util.AssertionErrors.*;
|
||||
* @author Keesun Baik
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Sebastien Deleuze
|
||||
* @author Brian Clozel
|
||||
* @since 3.2
|
||||
*/
|
||||
public class StatusResultMatchers {
|
||||
@@ -561,6 +562,14 @@ public class StatusResultMatchers {
|
||||
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).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user