Fix WebMvc auto-conf tests after Framework change

This commit adapts to a recent Spring Framework change (a40d25a) that
turns no-op Spring MVC beans (infrastructure components that, given
their configuration, won't contribute anything to the application) into
`NullBean` instances.
This commit is contained in:
Brian Clozel
2018-07-12 10:04:45 +02:00
parent 2e768c4e93
commit 2e5f0c2873

View File

@@ -191,9 +191,7 @@ public class WebMvcAutoConfigurationTests {
public void resourceHandlerMappingDisabled() {
this.contextRunner.withPropertyValues("spring.resources.add-mappings:false")
.run((context) -> {
Map<String, List<Resource>> locations = getResourceMappingLocations(
context);
assertThat(locations).isEmpty();
assertThat(context.getBean("resourceHandlerMapping")).isEqualTo(null);
});
}