[SECURITY-171] test

This commit is contained in:
Oliver Gondža committed 2015-03-07 20:32:17 +01:00
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")));
}
}