|
Lines 19-25
use Modern::Perl;
Link Here
|
| 19 |
use utf8; |
19 |
use utf8; |
| 20 |
use Encode; |
20 |
use Encode; |
| 21 |
|
21 |
|
| 22 |
use Test::More tests => 5; |
22 |
use Test::More tests => 6; |
| 23 |
use Test::MockModule; |
23 |
use Test::MockModule; |
| 24 |
use Test::Exception; |
24 |
use Test::Exception; |
| 25 |
|
25 |
|
|
Lines 297-299
subtest 'decoded_data() and set_encoded_data() tests' => sub {
Link Here
|
| 297 |
|
297 |
|
| 298 |
$schema->storage->txn_rollback; |
298 |
$schema->storage->txn_rollback; |
| 299 |
}; |
299 |
}; |
| 300 |
- |
300 |
|
|
|
301 |
subtest 'decoded_data() and set_encoded_data() tests' => sub { |
| 302 |
plan tests => 2; |
| 303 |
|
| 304 |
$ENV{KOHA_STOMP_HOSTNAME} = "not_localhost"; |
| 305 |
$ENV{KOHA_STOMP_PORT} = "99999"; |
| 306 |
|
| 307 |
t::lib::Mocks::mock_preference('JobsNotificationMethod', 'STOMP'); |
| 308 |
my $job = Koha::BackgroundJob->connect(); |
| 309 |
is( $job, undef, "Return undef if unable to connect when using stomp" ); |
| 310 |
|
| 311 |
t::lib::Mocks::mock_preference('JobsNotificationMethod', 'polling'); |
| 312 |
$job = Koha::BackgroundJob->connect(); |
| 313 |
is( $job, undef, "Return undef if using polling" ); |
| 314 |
} |