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

(-)a/t/db_dependent/Plugins.t (-2 / +21 lines)
Lines 18-29 use Modern::Perl; Link Here
18
18
19
use Archive::Extract;
19
use Archive::Extract;
20
use CGI;
20
use CGI;
21
use Cwd qw(abs_path);
21
use File::Basename;
22
use File::Basename;
23
use File::Spec;
22
use File::Temp qw( tempdir tempfile );
24
use File::Temp qw( tempdir tempfile );
23
use FindBin qw($Bin);
25
use FindBin qw($Bin);
24
use Module::Load::Conditional qw(can_load);
26
use Module::Load::Conditional qw(can_load);
25
use Test::MockModule;
27
use Test::MockModule;
26
use Test::More tests => 41;
28
use Test::More tests => 42;
27
29
28
use C4::Context;
30
use C4::Context;
29
use Koha::Database;
31
use Koha::Database;
Lines 222-224 subtest 'Test _version_compare' => sub { Link Here
222
    is( Koha::Plugins::Base::_version_compare( '1',        '1.0.0' ),    0, "1 is equal to 1.0.0" );
224
    is( Koha::Plugins::Base::_version_compare( '1',        '1.0.0' ),    0, "1 is equal to 1.0.0" );
223
    is( Koha::Plugins::Base::_version_compare( '1.0',      '1.0.0' ),    0, "1.0 is equal to 1.0.0" );
225
    is( Koha::Plugins::Base::_version_compare( '1.0',      '1.0.0' ),    0, "1.0 is equal to 1.0.0" );
224
};
226
};
225
- 
227
228
subtest 'bundle_path() tests' => sub {
229
230
    plan tests => 1;
231
232
    t::lib::Mocks::mock_config( 'enable_plugins', 1 );
233
234
    my @current_dir = File::Spec->splitdir(abs_path(__FILE__));
235
    # remote Plugins.t
236
    pop @current_dir;
237
    # remove db_dependent
238
    pop @current_dir;
239
240
    my $plugin = Koha::Plugin::Test->new;
241
242
    is( $plugin->bundle_path, File::Spec->catdir(@current_dir) . '/lib/Koha/Plugin/Test' );
243
244
};

Return to bug 22834