Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
bclozel committed Oct 20, 2023
1 parent 4bf995f commit dab7e03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,25 @@ public void matchExactEmpty() throws Exception {

@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("/", "/*");
}

Expand Down

0 comments on commit dab7e03

Please sign in to comment.