Browse Source

Fix tests failing on Windows

pull/4054/head
Phillip Webb 10 years ago
parent
commit
fa040c9e26
  1. 5
      spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpointIntegrationTests.java

5
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpointIntegrationTests.java

@ -44,6 +44,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @@ -44,6 +44,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/
public class MvcEndpointIntegrationTests {
private static final String LINE_SEPARATOR = System.getProperty("line.separator");
private AnnotationConfigWebApplicationContext context;
@Test
@ -77,7 +79,8 @@ public class MvcEndpointIntegrationTests { @@ -77,7 +79,8 @@ public class MvcEndpointIntegrationTests {
EnvironmentTestUtils.addEnvironment(this.context,
"spring.jackson.serialization.indent-output:true");
MockMvc mockMvc = createMockMvc();
mockMvc.perform(get("/beans")).andExpect(content().string(startsWith("{\n")));
mockMvc.perform(get("/beans")).andExpect(
content().string(startsWith("{" + LINE_SEPARATOR)));
}
private MockMvc createMockMvc() {

Loading…
Cancel
Save