From 3523a01a07381a701375b81d540e325559449aae Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 14 May 2018 12:03:32 -0300 Subject: [PATCH] Bug 20764: (QA follow-up) Fix path to sample plugins Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- t/db_dependent/ImportBatch.t | 5 ++--- t/db_dependent/Koha_Template_Plugin_KohaPlugins.t | 2 +- t/{ => lib}/Koha/Plugin/MarcFieldValues.pm | 0 t/{ => lib}/Koha/Plugin/Test.pm | 0 4 files changed, 3 insertions(+), 4 deletions(-) rename t/{ => lib}/Koha/Plugin/MarcFieldValues.pm (100%) rename t/{ => lib}/Koha/Plugin/Test.pm (100%) diff --git a/t/db_dependent/ImportBatch.t b/t/db_dependent/ImportBatch.t index 788be3fc6d..f42e0d8822 100644 --- a/t/db_dependent/ImportBatch.t +++ b/t/db_dependent/ImportBatch.t @@ -2,7 +2,7 @@ use Modern::Perl; use Test::More tests => 14; -use Cwd qw(abs_path); +use File::Basename; use File::Temp qw/tempfile/; use t::lib::Mocks; @@ -13,8 +13,7 @@ use Koha::Plugins; BEGIN { # Mock pluginsdir before loading Plugins module - my $path = abs_path(__FILE__); - $path =~ s/(\/[^\/]+){2}$//; # remove db_dependent and filename + my $path = dirname(__FILE__) . '/../lib'; t::lib::Mocks::mock_config( 'pluginsdir', $path ); use_ok('C4::ImportBatch'); } diff --git a/t/db_dependent/Koha_Template_Plugin_KohaPlugins.t b/t/db_dependent/Koha_Template_Plugin_KohaPlugins.t index 723f07c4ad..8f90125cc9 100755 --- a/t/db_dependent/Koha_Template_Plugin_KohaPlugins.t +++ b/t/db_dependent/Koha_Template_Plugin_KohaPlugins.t @@ -16,7 +16,7 @@ use C4::Context; use t::lib::Mocks; BEGIN { - push( @INC, dirname(__FILE__) ); + push( @INC, dirname(__FILE__) . '/../lib' ); use_ok('Koha::Plugins'); use_ok('Koha::Plugins::Handler'); diff --git a/t/Koha/Plugin/MarcFieldValues.pm b/t/lib/Koha/Plugin/MarcFieldValues.pm similarity index 100% rename from t/Koha/Plugin/MarcFieldValues.pm rename to t/lib/Koha/Plugin/MarcFieldValues.pm diff --git a/t/Koha/Plugin/Test.pm b/t/lib/Koha/Plugin/Test.pm similarity index 100% rename from t/Koha/Plugin/Test.pm rename to t/lib/Koha/Plugin/Test.pm -- 2.39.5