Merge branch '6.1.x'
This commit is contained in:
@@ -75,6 +75,19 @@ class ServletServerHttpResponseTests {
|
||||
assertThat(mockResponse.getCharacterEncoding()).as("Invalid Content-Type").isEqualTo("UTF-8");
|
||||
}
|
||||
|
||||
@Test
|
||||
void getHeadersWithNoContentType() {
|
||||
this.response = new ServletServerHttpResponse(this.mockResponse);
|
||||
assertThat(this.response.getHeaders().get(HttpHeaders.CONTENT_TYPE)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void getHeadersWithContentType() {
|
||||
this.mockResponse.setContentType(MediaType.TEXT_PLAIN_VALUE);
|
||||
this.response = new ServletServerHttpResponse(this.mockResponse);
|
||||
assertThat(this.response.getHeaders().get(HttpHeaders.CONTENT_TYPE)).containsExactly(MediaType.TEXT_PLAIN_VALUE);
|
||||
}
|
||||
|
||||
@Test
|
||||
void preExistingHeadersFromHttpServletResponse() {
|
||||
String headerName = "Access-Control-Allow-Origin";
|
||||
|
||||
Reference in New Issue
Block a user