Fix tests failing on Windows

This commit is contained in:
Phillip Webb
2015-09-29 09:22:49 -07:00
parent 204cb6f195
commit fa040c9e26

View File

@@ -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 {
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() {