mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-05-04 05:01:06 +01:00
Polish "Bind WebTestClient to the default WebHandler"
See gh-47617
This commit is contained in:
+8
-5
@@ -87,11 +87,14 @@ class WebTestClientAutoConfigurationTests {
|
||||
void shouldFailWithNeitherDefaultWebHandlerNorWebApplicationContext() {
|
||||
ClassLoader parentClassLoader = Thread.currentThread().getContextClassLoader();
|
||||
this.contextRunner.withClassLoader(new FilteredClassLoader(parentClassLoader, WebApplicationContext.class))
|
||||
.run((context) -> assertThat(context).getFailure()
|
||||
.rootCause()
|
||||
.isInstanceOf(RuntimeException.class)
|
||||
.hasMessageStartingWith("Mock WebTestClient support requires")
|
||||
.hasMessageContaining("WebApplicationContext"));
|
||||
.run((context) -> {
|
||||
assertThat(context).hasFailed();
|
||||
assertThat(context).getFailure()
|
||||
.rootCause()
|
||||
.isInstanceOf(RuntimeException.class)
|
||||
.hasMessageStartingWith("Mock WebTestClient support requires")
|
||||
.hasMessageContaining("WebApplicationContext");
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user