Fix CrashControllerIntegrationTests to match new error page format

This commit is contained in:
LIM YI TING 2025-04-27 15:28:26 +08:00
parent c289626824
commit afebf11cf7

View file

@ -88,9 +88,9 @@ class CrashControllerIntegrationTests {
assertThat(resp.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); assertThat(resp.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR);
assertThat(resp.getBody()).isNotNull(); assertThat(resp.getBody()).isNotNull();
// html: // html:
assertThat(resp.getBody()).containsSubsequence("<body>", "<h2>", "Something happened...", "</h2>", "<p>", assertThat(resp.getBody()).containsSubsequence("<body>", "<h2>", "Something happened...", "</h2>",
"Expected:", "controller", "used", "to", "showcase", "what", "happens", "when", "an", "exception", "is", "Expected:", "controller", "used", "to", "showcase", "what", "happens", "when", "an", "exception", "is",
"thrown", "</p>", "</body>"); "thrown", "</body>");
// Not the whitelabel error page: // Not the whitelabel error page:
assertThat(resp.getBody()).doesNotContain("Whitelabel Error Page", assertThat(resp.getBody()).doesNotContain("Whitelabel Error Page",
"This application has no explicit mapping for"); "This application has no explicit mapping for");