mirror of
https://github.com/apache/struts.git
synced 2026-08-06 15:17:00 +00:00
WN-5141
- fix expected message text from library
This commit is contained in:
@@ -343,28 +343,28 @@ public class CookieInterceptorTest extends StrutsInternalTestCase {
|
||||
new Cookie(pollution1, "pollution1");
|
||||
fail("It shouldn't be possible to create cookie: " + pollution1);
|
||||
} catch (IllegalArgumentException e) {
|
||||
assertEquals(e.getMessage(), "Cookie name \"" + pollution1 + "\" is a reserved token");
|
||||
assertTrue(e.getMessage(), e.getMessage().startsWith("Cookie name \"" + pollution1 + "\" is a reserved token"));
|
||||
}
|
||||
|
||||
try {
|
||||
new Cookie(pollution4, "pollution4");
|
||||
fail("It shouldn't be possible to create cookie: " + pollution4);
|
||||
} catch (IllegalArgumentException e) {
|
||||
assertEquals(e.getMessage(), "Cookie name \"" + pollution4 + "\" is a reserved token");
|
||||
assertTrue(e.getMessage(), e.getMessage().startsWith("Cookie name \"" + pollution4 + "\" is a reserved token"));
|
||||
}
|
||||
|
||||
try {
|
||||
new Cookie(pollution5, "pollution5");
|
||||
fail("It shouldn't be possible to create cookie: " + pollution5);
|
||||
} catch (IllegalArgumentException e) {
|
||||
assertEquals(e.getMessage(), "Cookie name \"" + pollution5 + "\" is a reserved token");
|
||||
assertTrue(e.getMessage(), e.getMessage().startsWith("Cookie name \"" + pollution5 + "\" is a reserved token"));
|
||||
}
|
||||
|
||||
try {
|
||||
new Cookie(pollution6, "pollution6");
|
||||
fail("It shouldn't be possible to create cookie: " + pollution6);
|
||||
} catch (IllegalArgumentException e) {
|
||||
assertEquals(e.getMessage(), "Cookie name \"" + pollution6 + "\" is a reserved token");
|
||||
assertTrue(e.getMessage(), e.getMessage().startsWith("Cookie name \"" + pollution6 + "\" is a reserved token"));
|
||||
}
|
||||
|
||||
request.setCookies(
|
||||
|
||||
Reference in New Issue
Block a user