Bugzilla – Attachment 51854 Details for
Bug 16502
Table koha_plugin_com_bywatersolutions_kitchensink_mytable not always dropped after running Plugin.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16502: Add additional test to Plugins.t
Bug-16502-Add-additional-test-to-Pluginst.patch (text/plain), 2.32 KB, created by
Marcel de Rooy
on 2016-05-27 06:19:39 UTC
(
hide
)
Description:
Bug 16502: Add additional test to Plugins.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-05-27 06:19:39 UTC
Size:
2.32 KB
patch
obsolete
>From 73c8e32bc725a96febd1b390a1d84f1ff3b11d0a Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 16 May 2016 19:00:16 +0200 >Subject: [PATCH] Bug 16502: Add additional test to Plugins.t >Content-Type: text/plain; charset=utf-8 > >In order to verify if the delete now really works, we add one test >in Plugins.t. > >Test plan: >[1] Run the test. >[2] Bonus: Comment line 63 in Plugins.t where delete is called. > Run the test again. It should fail now. > >Signed-off-by: Srdjan <srdjan@catalyst.net.nz> >--- > t/db_dependent/Plugins.t | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Plugins.t b/t/db_dependent/Plugins.t >index 6cff239..308e215 100755 >--- a/t/db_dependent/Plugins.t >+++ b/t/db_dependent/Plugins.t >@@ -3,7 +3,7 @@ > use strict; > use warnings; > >-use Test::More tests => 21; >+use Test::More tests => 22; > use File::Basename; > use FindBin qw($Bin); > use Archive::Extract; >@@ -47,8 +47,8 @@ ok( $plugins[0]->get_metadata()->{'name'} eq 'Test Plugin', "Koha::Plugins::GetP > > SKIP: { > my $plugins_dir = C4::Context->config("pluginsdir"); >- skip "plugindir not set", 3 unless defined $plugins_dir; >- skip "plugindir not writable", 3 unless -w $plugins_dir; >+ skip "plugindir not set", 4 unless defined $plugins_dir; >+ skip "plugindir not writable", 4 unless -w $plugins_dir; > # no need to skip further tests if KitchenSink would already exist > > my $ae = Archive::Extract->new( archive => "$Bin/KitchenSinkPlugin.kpz", type => 'zip' ); >@@ -57,8 +57,12 @@ SKIP: { > } > use_ok('Koha::Plugin::Com::ByWaterSolutions::KitchenSink'); > $plugin = Koha::Plugin::Com::ByWaterSolutions::KitchenSink->new({ enable_plugins => 1}); >+ my $table = $plugin->get_qualified_table_name( 'mytable' ); > > ok( -f $plugins_dir . "/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm", "KitchenSink plugin installed successfully" ); > Koha::Plugins::Handler->delete({ class => "Koha::Plugin::Com::ByWaterSolutions::KitchenSink", enable_plugins => 1 }); >+ my $sth = C4::Context->dbh->table_info( undef, undef, $table, 'TABLE' ); >+ my $info = $sth->fetchall_arrayref; >+ is( @$info, 0, "Table $table does no longer exist" ); > ok( !( -f $plugins_dir . "/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm" ), "Koha::Plugins::Handler::delete works correctly." ); > } >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16502
:
51544
|
51545
|
51713
|
51714
|
51804
|
51805
|
51806
|
51853
|
51854
|
51855
|
51856
|
52260
|
52261
|
52262
|
52263