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

(-)a/t/db_dependent/Plugins.t (-2 / +21 lines)
Lines 4-15 use Modern::Perl; Link Here
4
4
5
use Archive::Extract;
5
use Archive::Extract;
6
use CGI;
6
use CGI;
7
use Cwd qw(abs_path);
7
use File::Basename;
8
use File::Basename;
9
use File::Spec;
8
use File::Temp qw( tempdir tempfile );
10
use File::Temp qw( tempdir tempfile );
9
use FindBin qw($Bin);
11
use FindBin qw($Bin);
10
use Module::Load::Conditional qw(can_load);
12
use Module::Load::Conditional qw(can_load);
11
use Test::MockModule;
13
use Test::MockModule;
12
use Test::More tests => 42;
14
use Test::More tests => 43;
13
15
14
use C4::Context;
16
use C4::Context;
15
use Koha::Database;
17
use Koha::Database;
Lines 193-195 subtest 'Test _version_compare' => sub { Link Here
193
    is( Koha::Plugins::Base::_version_compare( '1',        '1.0.0' ),    0, "1 is equal to 1.0.0" );
195
    is( Koha::Plugins::Base::_version_compare( '1',        '1.0.0' ),    0, "1 is equal to 1.0.0" );
194
    is( Koha::Plugins::Base::_version_compare( '1.0',      '1.0.0' ),    0, "1.0 is equal to 1.0.0" );
196
    is( Koha::Plugins::Base::_version_compare( '1.0',      '1.0.0' ),    0, "1.0 is equal to 1.0.0" );
195
};
197
};
196
- 
198
199
subtest 'bundle_path() tests' => sub {
200
201
    plan tests => 1;
202
203
    t::lib::Mocks::mock_config( 'enable_plugins', 1 );
204
205
    my @current_dir = File::Spec->splitdir(abs_path(__FILE__));
206
    # remote Plugins.t
207
    pop @current_dir;
208
    # remove db_dependent
209
    pop @current_dir;
210
211
    my $plugin = Koha::Plugin::Test->new;
212
213
    is( $plugin->bundle_path, File::Spec->catdir(@current_dir) . '/lib/Koha/Plugin/Test' );
214
215
};

Return to bug 22834