Fix failing PathRequestTests

Fix test failing due to commit d66496787d.

See gh-12238
This commit is contained in:
Phillip Webb 2018-02-27 17:06:21 -08:00
parent d66496787d
commit c23b0e99f1
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletRequest;
import org.assertj.core.api.AssertDelegateTarget;
import org.junit.Test;
import org.springframework.boot.autoconfigure.h2.H2ConsoleProperties;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockServletContext;
@ -54,6 +55,7 @@ public class PathRequestTests {
private RequestMatcherAssert assertMatcher(RequestMatcher matcher) {
StaticWebApplicationContext context = new StaticWebApplicationContext();
context.registerBean(ServerProperties.class);
context.registerBean(H2ConsoleProperties.class);
return assertThat(new RequestMatcherAssert(context, matcher));
}