Polish
See gh-28041
This commit is contained in:
@@ -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("/", "/*");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user