Merge branch '2.0.x' into 2.1.x

Closes gh-17078
This commit is contained in:
Andy Wilkinson
2019-06-07 10:50:34 +01:00
2691 changed files with 27746 additions and 46049 deletions

View File

@@ -50,8 +50,7 @@ public class SampleWebFreeMarkerApplicationTests {
@Test
public void testFreeMarkerTemplate() {
ResponseEntity<String> entity = this.testRestTemplate.getForEntity("/",
String.class);
ResponseEntity<String> entity = this.testRestTemplate.getForEntity("/", String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).contains("Hello, Andy");
}
@@ -62,12 +61,11 @@ public class SampleWebFreeMarkerApplicationTests {
headers.setAccept(Arrays.asList(MediaType.TEXT_HTML));
HttpEntity<String> requestEntity = new HttpEntity<>(headers);
ResponseEntity<String> responseEntity = this.testRestTemplate
.exchange("/does-not-exist", HttpMethod.GET, requestEntity, String.class);
ResponseEntity<String> responseEntity = this.testRestTemplate.exchange("/does-not-exist", HttpMethod.GET,
requestEntity, String.class);
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
assertThat(responseEntity.getBody())
.contains("Something went wrong: 404 Not Found");
assertThat(responseEntity.getBody()).contains("Something went wrong: 404 Not Found");
}
}