Skip to content

Commit e7d921c

Browse files
committed
Align test expectations with styling of stack trace div
Closes gh-15075
1 parent bfb0886 commit e7d921c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ public void defaultErrorView() {
195195
.contentType(MediaType.TEXT_HTML).expectBody(String.class)
196196
.returnResult().getResponseBody();
197197
assertThat(body).contains("Whitelabel Error Page")
198-
.contains("<div>Expected!</div>")
199-
.contains("<div>java.lang.IllegalStateException");
198+
.contains("<div>Expected!</div>").contains(
199+
"<div style='white-space:pre-wrap;'>java.lang.IllegalStateException");
200200
});
201201
}
202202

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public void renderContainsViewWithExceptionDetails() throws Exception {
6060
.getContentAsString();
6161
assertThat(responseString).contains(
6262
"<p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p>")
63-
.contains("<div>Exception message</div>")
64-
.contains("<div>java.lang.IllegalStateException");
63+
.contains("<div>Exception message</div>").contains(
64+
"<div style='white-space:pre-wrap;'>java.lang.IllegalStateException");
6565
});
6666
}
6767

0 commit comments

Comments
 (0)