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

(-)a/t/db_dependent/Koha/Plugins/Plugins.t (-3 / +3 lines)
Lines 25-31 use File::Temp qw( tempdir tempfile ); Link Here
25
use FindBin qw($Bin);
25
use FindBin qw($Bin);
26
use Module::Load::Conditional qw(can_load);
26
use Module::Load::Conditional qw(can_load);
27
use Test::MockModule;
27
use Test::MockModule;
28
use Test::More tests => 53;
28
use Test::More tests => 55;
29
29
30
use C4::Context;
30
use C4::Context;
31
use Koha::Database;
31
use Koha::Database;
Lines 263-273 for my $pass ( 1 .. 2 ) { Link Here
263
    ok( -f $plugins_dir . "/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm", "KitchenSink plugin installed successfully" );
263
    ok( -f $plugins_dir . "/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm", "KitchenSink plugin installed successfully" );
264
    $INC{$pm_path} = $full_pm_path; # FIXME I do not really know why, but if this is moved before the $plugin constructor, it will fail with Can't locate object method "new" via package "Koha::Plugin::Com::ByWaterSolutions::KitchenSink"
264
    $INC{$pm_path} = $full_pm_path; # FIXME I do not really know why, but if this is moved before the $plugin constructor, it will fail with Can't locate object method "new" via package "Koha::Plugin::Com::ByWaterSolutions::KitchenSink"
265
    Koha::Plugins->new( { enable_plugins => 1 } )->InstallPlugins();
265
    Koha::Plugins->new( { enable_plugins => 1 } )->InstallPlugins();
266
    ok( -f $full_pm_path, "Koha::Plugins::Handler::delete works correctly (pass $pass)" );
266
    Koha::Plugins::Handler->delete({ class => "Koha::Plugin::Com::ByWaterSolutions::KitchenSink", enable_plugins => 1 });
267
    Koha::Plugins::Handler->delete({ class => "Koha::Plugin::Com::ByWaterSolutions::KitchenSink", enable_plugins => 1 });
267
    my $sth = C4::Context->dbh->table_info( undef, undef, $table, 'TABLE' );
268
    my $sth = C4::Context->dbh->table_info( undef, undef, $table, 'TABLE' );
268
    my $info = $sth->fetchall_arrayref;
269
    my $info = $sth->fetchall_arrayref;
269
    is( @$info, 0, "Table $table does no longer exist" );
270
    is( @$info, 0, "Table $table does no longer exist" );
270
    ok( !( -f $full_pm_path ), "Koha::Plugins::Handler::delete works correctly." );
271
    ok( !( -f $full_pm_path ), "Koha::Plugins::Handler::delete works correctly (pass $pass)" );
271
}
272
}
272
273
273
subtest 'output and output_html tests' => sub {
274
subtest 'output and output_html tests' => sub {
274
- 

Return to bug 21670