mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 13:02:19 +00:00
[SECURITY-171] test
This commit is contained in:
1 parent
feb2703adb
commit
f880d8d2cd
1 file changed
+9
@@ -23,6 +23,10 @@
|
||||
*/
|
||||
package hudson.util;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.hamcrest.CoreMatchers.not;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
@@ -51,4 +55,9 @@ public class FormValidationTest extends TestCase {
|
||||
public void testMessage() {
|
||||
assertEquals("test msg", FormValidation.errorWithMarkup("test msg").getMessage());
|
||||
}
|
||||
|
||||
public void testFormValidationException() {
|
||||
FormValidation fv = FormValidation.error(new Exception("<html"), "Message<html");
|
||||
assertThat(fv.renderHtml(), not(containsString("<html")));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user