View | Details | Raw Unified | Return to bug 37872
Collapse All | Expand All

(-)a/t/db_dependent/Koha/ILL/Request.t (-1 / +18 lines)
Lines 19-29 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::More tests => 3;
22
use Test::More tests => 4;
23
use Test::MockModule;
23
use Test::MockModule;
24
24
25
use Koha::ILL::Requests;
25
use Koha::ILL::Requests;
26
26
27
use t::lib::Mocks;
27
use t::lib::TestBuilder;
28
use t::lib::TestBuilder;
28
29
29
my $builder = t::lib::TestBuilder->new;
30
my $builder = t::lib::TestBuilder->new;
Lines 130-132 subtest 'get_type_disclaimer_date() tests' => sub { Link Here
130
131
131
    $schema->storage->txn_rollback;
132
    $schema->storage->txn_rollback;
132
};
133
};
134
135
subtest 'get_backend_plugin() tests' => sub {
136
137
    plan tests => 1;
138
139
    $schema->storage->txn_begin;
140
141
    my $request = $builder->build_object( { class => 'Koha::ILL::Requests' } );
142
    t::lib::Mocks::mock_config( 'enable_plugins', 0 );
143
    is(
144
        $request->get_backend_plugin, undef,
145
        'get_backend_plugin returns undef if plugins are disabled'
146
    );
147
148
    $schema->storage->txn_rollback;
149
};
(-)a/t/db_dependent/Koha/ILL/Request/Config.t (-2 / +16 lines)
Lines 23-29 use t::lib::TestBuilder; Link Here
23
use Test::MockObject;
23
use Test::MockObject;
24
use Test::Exception;
24
use Test::Exception;
25
25
26
use Test::More tests => 5;
26
use Test::More tests => 6;
27
27
28
my $schema = Koha::Database->new->schema;
28
my $schema = Koha::Database->new->schema;
29
my $builder = t::lib::TestBuilder->new;
29
my $builder = t::lib::TestBuilder->new;
Lines 487-491 subtest 'Final tests' => sub { Link Here
487
    $schema->storage->txn_rollback;
487
    $schema->storage->txn_rollback;
488
};
488
};
489
489
490
subtest 'get_backend_plugin_names() tests' => sub {
491
492
    plan tests => 1;
493
494
    $schema->storage->txn_begin;
495
496
    my $config = Koha::ILL::Request::Config->new;
497
    t::lib::Mocks::mock_config( 'enable_plugins', 0 );
498
    is(
499
        $config->get_backend_plugin_names(), 0,
500
        'get_backend_plugin_names returns empty list if plugins are disabled'
501
    );
502
503
    $schema->storage->txn_rollback;
504
};
490
505
491
1;
506
1;
492
- 

Return to bug 37872