X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FBackgroundJob%2FSelfTest.pm;h=6137ced4270e8e5cd8e62d4481480a14aef24244;hb=9b36c5639d01f1c9059381c12fac5d57ff614710;hp=917dc0e187f2147a4f9d00a27b85ace090c11762;hpb=f46dfda018cac3aeaa549d678ad036d0cfff2e6d;p=kivitendo-erp.git diff --git a/SL/BackgroundJob/SelfTest.pm b/SL/BackgroundJob/SelfTest.pm index 917dc0e18..6137ced42 100644 --- a/SL/BackgroundJob/SelfTest.pm +++ b/SL/BackgroundJob/SelfTest.pm @@ -11,6 +11,7 @@ use Sys::Hostname; use FindBin; use SL::DB::AuthUser; +use SL::DB::Default; use SL::Common; use Rose::Object::MakeMethods::Generic ( @@ -37,6 +38,7 @@ sub setup { $self->config($::lx_office_conf{self_test} || {}); $self->tester(Test::Builder->new); + $self->tester->reset; # stupid Test::Builder mplementation uses class variables $self->aggreg(TAP::Parser::Aggregator->new); $self->modules(split /\s+/, $self->config->{modules}); @@ -122,7 +124,7 @@ sub _send_email { my ($output, $content_type) = $self->_prepare_report; - my $mail = Mailer->new(charset => $::locale->is_utf8 ? 'UTF-8' : Common->DEFAULT_CHARSET ); + my $mail = Mailer->new; $mail->{from} = $self->config->{email_from}; $mail->{to} = $email; $mail->{subject} = $self->config->{email_subject}; @@ -144,7 +146,7 @@ sub _prepare_report { return unless $template; my $email_template = $self->config->{email_template}; - my $filename = $email_template || ( ($user->get_config_value('templates') || "templates/mails") . "/self_test/status_mail.txt" ); + my $filename = $email_template || ( (SL::DB::Default->get->templates || "templates/mails") . "/self_test/status_mail.txt" ); my $content_type = $filename =~ m/.html$/ ? 'text/html' : 'text/plain';