Bug 29427: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Tomás Cohen Arazi 2021-11-05 12:50:01 -03:00 committed by Jonathan Druart
parent a9b5c861b2
commit f6b6bdb96f

View file

@ -31,14 +31,14 @@ my $builder = t::lib::TestBuilder->new;
subtest 'transport() tests' => sub {
plan tests => 4;
plan tests => 6;
$schema->storage->txn_begin;
my $server = $builder->build_object(
{
class => 'Koha::SMTP::Servers',
value => { ssl_mode => 'disabled' }
value => { ssl_mode => 'disabled', debug => 0 }
}
);
@ -52,6 +52,12 @@ subtest 'transport() tests' => sub {
is( ref($transport), 'Email::Sender::Transport::SMTP', 'Type is correct' );
is( $transport->ssl, '1', 'SSL is set' );
is( $transport->debug, '0', 'Debug setting honoured (disabled)' );
$server->set({ debug => 1 })->store;
$transport = $server->transport;
is( $transport->debug, '1', 'Debug setting honoured (enabled)' );
$schema->storage->txn_rollback;
};