mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Fix missing assertion in DefaultClientResponseTests
Closes gh-37248 Signed-off-by: Hyunwoo Jung <hyunwoojung@kakao.com>
This commit is contained in:
+1
-3
@@ -289,7 +289,6 @@ class DefaultClientResponseTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
void createException() {
|
||||
byte[] bytes = "foo".getBytes(StandardCharsets.UTF_8);
|
||||
DataBuffer dataBuffer = DefaultDataBufferFactory.sharedInstance.wrap(bytes);
|
||||
@@ -368,7 +367,6 @@ class DefaultClientResponseTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
void createError() {
|
||||
byte[] bytes = "foo".getBytes(StandardCharsets.UTF_8);
|
||||
DataBuffer dataBuffer = DefaultDataBufferFactory.sharedInstance.wrap(bytes);
|
||||
@@ -387,7 +385,7 @@ class DefaultClientResponseTests {
|
||||
WebClientResponseException exception = (WebClientResponseException) t;
|
||||
assertThat(exception.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
|
||||
assertThat(exception.getMessage()).isEqualTo("404 Not Found");
|
||||
assertThat(exception.getHeaders().containsHeaderValue("Content-Type", "text/plain"));
|
||||
assertThat(exception.getHeaders().containsHeaderValue("Content-Type", "text/plain")).isTrue();
|
||||
assertThat(exception.getResponseBodyAsByteArray()).isEqualTo(bytes);
|
||||
})
|
||||
.verify();
|
||||
|
||||
Reference in New Issue
Block a user