Skip to content
Permalink
Browse files

[JENKINS-42310] Added Test cases for the JobDescription Lint defect

  • Loading branch information...
v1v committed Feb 24, 2017
1 parent ced83f2 commit a531774efd92254528171a345f3666113d638fdf
@@ -1,8 +1,11 @@
package org.jenkins.ci.plugins.jenkinslint.check;

import hudson.matrix.MatrixProject;
import hudson.maven.MavenModuleSet;
import hudson.model.FreeStyleProject;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;

import static org.junit.Assert.assertFalse;
@@ -30,6 +33,27 @@
project.setDescription("Some Description");
assertFalse(checker.executeCheck(project));
}
@Issue("JENKINS-42310")
@Test public void testMavenModuleJob() throws Exception {
MavenModuleSet project = j.createMavenProject();
assertTrue(checker.executeCheck(project));
}
@Issue("JENKINS-42310")
@Test public void testMavenDescription() throws Exception {
MavenModuleSet project = j.createMavenProject("WithoutSystem");
project.setDescription("Some Description");
assertFalse(checker.executeCheck(project));
}
@Issue("JENKINS-42310")
@Test public void testMatrixProject() throws Exception {
MatrixProject project = j.createMatrixProject();
assertTrue(checker.executeCheck(project));
}
@Test public void testMatrixProjectDescription() throws Exception {
MatrixProject project = j.createMatrixProject("WithoutSystem");
project.setDescription("Some Description");
assertFalse(checker.executeCheck(project));
}
@Test public void testControlComment() throws Exception {
FreeStyleProject project = j.createFreeStyleProject();
assertFalse(checker.isIgnored(project.getDescription()));

0 comments on commit a531774

Please sign in to comment.
You can’t perform that action at this time.