Merge branch '1.2.x'
This commit is contained in:
@@ -55,13 +55,13 @@ public class SampleWebUiApplicationTests {
|
||||
|
||||
@Test
|
||||
public void testHome() 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 (title doesn't match):\n" + entity.getBody(), entity
|
||||
.getBody().contains("<title>Messages"));
|
||||
assertFalse("Wrong body (found layout:fragment):\n" + entity.getBody(), entity
|
||||
.getBody().contains("layout:fragment"));
|
||||
assertTrue("Wrong body (title doesn't match):\n" + entity.getBody(),
|
||||
entity.getBody().contains("<title>Messages"));
|
||||
assertFalse("Wrong body (found layout:fragment):\n" + entity.getBody(),
|
||||
entity.getBody().contains("layout:fragment"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -69,8 +69,8 @@ public class SampleWebUiApplicationTests {
|
||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>();
|
||||
map.set("text", "FOO text");
|
||||
map.set("summary", "FOO");
|
||||
URI location = new TestRestTemplate().postForLocation("http://localhost:"
|
||||
+ this.port, map);
|
||||
URI location = new TestRestTemplate()
|
||||
.postForLocation("http://localhost:" + this.port, map);
|
||||
assertTrue("Wrong location:\n" + location,
|
||||
location.toString().contains("localhost:" + this.port));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user