Commit e7d921c2 authored by Andy Wilkinson's avatar Andy Wilkinson

Align test expectations with styling of stack trace div

Closes gh-15075
parent bfb08864
...@@ -195,8 +195,8 @@ public class DefaultErrorWebExceptionHandlerIntegrationTests { ...@@ -195,8 +195,8 @@ public class DefaultErrorWebExceptionHandlerIntegrationTests {
.contentType(MediaType.TEXT_HTML).expectBody(String.class) .contentType(MediaType.TEXT_HTML).expectBody(String.class)
.returnResult().getResponseBody(); .returnResult().getResponseBody();
assertThat(body).contains("Whitelabel Error Page") assertThat(body).contains("Whitelabel Error Page")
.contains("<div>Expected!</div>") .contains("<div>Expected!</div>").contains(
.contains("<div>java.lang.IllegalStateException"); "<div style='white-space:pre-wrap;'>java.lang.IllegalStateException");
}); });
} }
......
...@@ -60,8 +60,8 @@ public class ErrorMvcAutoConfigurationTests { ...@@ -60,8 +60,8 @@ public class ErrorMvcAutoConfigurationTests {
.getContentAsString(); .getContentAsString();
assertThat(responseString).contains( assertThat(responseString).contains(
"<p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p>") "<p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p>")
.contains("<div>Exception message</div>") .contains("<div>Exception message</div>").contains(
.contains("<div>java.lang.IllegalStateException"); "<div style='white-space:pre-wrap;'>java.lang.IllegalStateException");
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment