Merge pull request #19 from lookout/issue/18

Add test to ensure that a newly-created job can be configured via the web UI
This commit is contained in:
R. Tyler Croy 2015-04-02 15:04:41 -07:00
commit 76e9ecbd54
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
package org.jenkinsci.plugins.deploydb;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import hudson.model.AbstractProject;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
import static org.junit.Assert.assertNotNull;
public class JobConfigTest {
@Rule public final JenkinsRule jenkins = new JenkinsRule();
@Test public void newJobConfigurationShouldNotFail() throws Exception {
// Given we create a brand new job
AbstractProject<?, ?> job = jenkins.createFreeStyleProject();
// When we open its configuration page
HtmlPage page = jenkins.createWebClient().getPage(job, "configure");
// Then nothing untoward should happen (i.e. no 500 error)
assertNotNull(page);
}
}