@ -40,6 +40,7 @@ import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService ;
import org.springframework.security.core.userdetails.UserDetailsService ;
import org.springframework.security.web.FilterChainProxy ;
import org.springframework.security.web.FilterChainProxy ;
import org.springframework.test.util.ReflectionTestUtils ;
import org.springframework.test.util.ReflectionTestUtils ;
import org.springframework.util.StringUtils ;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext ;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext ;
import static org.junit.Assert.assertEquals ;
import static org.junit.Assert.assertEquals ;
@ -79,6 +80,12 @@ public class ManagementSecurityAutoConfigurationTests {
. size ( ) ) ;
. size ( ) ) ;
}
}
@Test
public void testPathNormalization ( ) throws Exception {
String path = "admin/./error" ;
assertEquals ( "admin/error" , StringUtils . cleanPath ( path ) ) ;
}
@Test
@Test
public void testWebConfigurationWithExtraRole ( ) throws Exception {
public void testWebConfigurationWithExtraRole ( ) throws Exception {
this . context = new AnnotationConfigWebApplicationContext ( ) ;
this . context = new AnnotationConfigWebApplicationContext ( ) ;