Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 2; |
20 |
use Test::More tests => 3; |
21 |
use Test::Exception; |
21 |
use Test::Exception; |
22 |
use Test::Warn; |
22 |
use Test::Warn; |
23 |
|
23 |
|
Lines 118-120
subtest 'store() tests' => sub {
Link Here
|
118 |
|
118 |
|
119 |
$schema->storage->txn_rollback; |
119 |
$schema->storage->txn_rollback; |
120 |
}; |
120 |
}; |
121 |
- |
121 |
|
|
|
122 |
subtest 'transport() tests' => sub { |
123 |
|
124 |
plan tests => 4; |
125 |
|
126 |
$schema->storage->txn_begin; |
127 |
|
128 |
my $server = $builder->build_object( |
129 |
{ |
130 |
class => 'Koha::SMTP::Servers', |
131 |
value => { ssl_mode => 'disabled' } |
132 |
} |
133 |
); |
134 |
|
135 |
my $transport = $server->transport; |
136 |
|
137 |
is( ref($transport), 'Email::Sender::Transport::SMTP', 'Type is correct' ); |
138 |
is( $transport->ssl, 0, 'SSL is not set' ); |
139 |
|
140 |
$server->set({ ssl_mode => 'ssl' })->store; |
141 |
$transport = $server->transport; |
142 |
|
143 |
is( ref($transport), 'Email::Sender::Transport::SMTP', 'Type is correct' ); |
144 |
is( $transport->ssl, 'ssl', 'SSL is set' ); |
145 |
|
146 |
$schema->storage->txn_rollback; |
147 |
}; |