use of org.jenkinsci.test.acceptance.plugins.email_ext.EmailExtPublisher in project acceptance-test-harness by jenkinsci.
the class EmailExtPluginTest method build.
@Test
public void build() {
MailhogContainer mailhog = mailhogProvider.get();
FreeStyleJob job = jenkins.jobs.create();
job.configure();
job.addShellStep("false");
EmailExtPublisher pub = job.addPublisher(EmailExtPublisher.class);
pub.subject.set("Modified $DEFAULT_SUBJECT");
pub.setRecipient("dev@example.com");
pub.body.set("$DEFAULT_CONTENT\nwith amendment");
job.save();
Build b = job.startBuild().shouldFail();
mailhog.assertMail(Pattern.compile("^Modified "), "dev@example.com", Pattern.compile("\nwith amendment$"));
}
Aggregations