parent
4bf995fa8b
commit
dab7e03c93
|
|
@ -49,9 +49,9 @@ final class MockMvcFilterDecorator implements Filter {
|
|||
|
||||
private static final String ALL_MAPPING_PATTERN = "*";
|
||||
|
||||
private static final String EXTENSION_MAPPING_PATTERN = ALL_MAPPING_PATTERN + ".";
|
||||
private static final String EXTENSION_MAPPING_PATTERN = "*.";
|
||||
|
||||
private static final String PATH_MAPPING_PATTERN = "/" + ALL_MAPPING_PATTERN;
|
||||
private static final String PATH_MAPPING_PATTERN = "/*";
|
||||
|
||||
private final Filter delegate;
|
||||
|
||||
|
|
|
|||
|
|
@ -90,21 +90,25 @@ public class MockMvcFilterDecoratorTests {
|
|||
|
||||
@Test
|
||||
public void matchPathMappingAllFolder() throws Exception {
|
||||
assertFilterInvoked("/test/this", "*");
|
||||
assertFilterInvoked("/test/this", "/*");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void matchPathMappingAll() throws Exception {
|
||||
assertFilterInvoked("/test", "*");
|
||||
assertFilterInvoked("/test", "/*");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void matchPathMappingAllContextRoot() throws Exception {
|
||||
assertFilterInvoked("", "*");
|
||||
assertFilterInvoked("", "/*");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void matchPathMappingContextRootAndSlash() throws Exception {
|
||||
assertFilterInvoked("/", "*");
|
||||
assertFilterInvoked("/", "/*");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue