Merge branch '1.2.x'
This commit is contained in:
@@ -55,8 +55,8 @@ public class SampleWebVelocityApplicationTests {
|
||||
|
||||
@Test
|
||||
public void testVelocityTemplate() throws Exception {
|
||||
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(
|
||||
"http://localhost:" + this.port, String.class);
|
||||
ResponseEntity<String> entity = new TestRestTemplate()
|
||||
.getForEntity("http://localhost:" + this.port, String.class);
|
||||
assertEquals(HttpStatus.OK, entity.getStatusCode());
|
||||
assertTrue("Wrong body:\n" + entity.getBody(),
|
||||
entity.getBody().contains("Hello, Andy"));
|
||||
@@ -73,8 +73,8 @@ public class SampleWebVelocityApplicationTests {
|
||||
requestEntity, String.class);
|
||||
|
||||
assertEquals(HttpStatus.NOT_FOUND, responseEntity.getStatusCode());
|
||||
assertTrue("Wrong body:\n" + responseEntity.getBody(), responseEntity.getBody()
|
||||
.contains("Something went wrong: 404 Not Found"));
|
||||
assertTrue("Wrong body:\n" + responseEntity.getBody(),
|
||||
responseEntity.getBody().contains("Something went wrong: 404 Not Found"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user