Skip to content

Commit bf0826f

Browse files
committed
WW-4390 Adds additional use case to proof that everything works
1 parent cefdd16 commit bf0826f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

xwork-core/src/test/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsCheckerTest.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,21 @@ public void testParamWithClassInName() throws Exception {
8383
}
8484
}
8585

86+
public void testStrutsTokenIsExcluded() throws Exception {
87+
// given
88+
List<String> tokens = new ArrayList<String>();
89+
tokens.add("struts.token.name");
90+
tokens.add("struts.token");
91+
92+
ExcludedPatternsChecker checker = new DefaultExcludedPatternsChecker();
93+
94+
for (String token : tokens) {
95+
// when
96+
ExcludedPatternsChecker.IsExcluded actual = checker.isExcluded(token);
97+
98+
// then
99+
assertTrue("Param '" + token + "' is not excluded!", actual.isExcluded());
100+
}
101+
}
102+
86103
}

0 commit comments

Comments
 (0)