DummyRequest supports methods for MvcRequestMatcher
To support MvcRequestMatcher DummyRequest needs to support getCharacterEncoding() and getAttribute(String)
This commit is contained in:
@@ -95,6 +95,13 @@ public class HttpSecurityRequestMatchersTests {
|
||||
.isEqualTo(HttpServletResponse.SC_UNAUTHORIZED);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mvcMatcherGetFiltersNoUnsupportedMethodExceptionFromDummyRequest() {
|
||||
loadConfig(MvcMatcherConfig.class);
|
||||
|
||||
assertThat(springSecurityFilterChain.getFilters("/path")).isNotEmpty();
|
||||
}
|
||||
|
||||
@EnableWebSecurity
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
|
||||
Reference in New Issue
Block a user