use of org.jenkinsci.plugins.casc.misc.ConfiguredWithCode in project configuration-as-code-plugin by jenkinsci.
the class MailerTest method configure_mailer.
@Test
@ConfiguredWithCode("MailerTest.yml")
public void configure_mailer() throws Exception {
final Jenkins jenkins = Jenkins.getInstance();
final Mailer.DescriptorImpl descriptor = (Mailer.DescriptorImpl) jenkins.getDescriptor(Mailer.class);
assertEquals("4441", descriptor.getSmtpPort());
assertEquals("do-not-reply@acme.org", descriptor.getReplyToAddress());
// FIXME setAdminAddress is deprecated and should NOT be set this way
// see https://github.com/jenkinsci/mailer-plugin/pull/39
assertEquals("admin@acme.org", descriptor.getAdminAddress());
}
Aggregations