Skip to content

Commit

Permalink
Add Test
Browse files Browse the repository at this point in the history
Issue gh-13660
  • Loading branch information
jzheaux committed Oct 30, 2023
1 parent 4d6ff49 commit ed6ff67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void doFilter(ServletRequest request, ServletResponse response) throws IO

static final class ObservationFilter implements Filter {

private static final Map<String, String> OBSERVATION_NAMES = new HashMap<>();
static final Map<String, String> OBSERVATION_NAMES = new HashMap<>();

static {
OBSERVATION_NAMES.put("DisableEncodeUrlFilter", "session.urlencoding");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ void decorateFiltersWhenCompletesThenHasSpringSecurityReachedFilterNameTag(Filte
.isEqualTo(expectedFilterNameTag);
}

// gh-13660
@Test
void observationNamesDoNotContainDashes() {
ObservationFilterChainDecorator.ObservationFilter.OBSERVATION_NAMES.values()
.forEach((name) -> assertThat(name).doesNotContain("-"));
}

static Stream<Arguments> decorateFiltersWhenCompletesThenHasSpringSecurityReachedFilterNameTag() {
Filter filterWithName = new BasicAuthenticationFilter();

Expand Down

0 comments on commit ed6ff67

Please sign in to comment.