From 3244282241b46f3e7834806410fd0a2ed5f55c62 Mon Sep 17 00:00:00 2001 From: Srdjan Date: Tue, 14 Mar 2017 12:24:42 +1300 Subject: [PATCH] Bug 18243: 16034 follow-up: Conditionally test Koha::ExternalContent::* modules loading To test: 1 - Make sure you don't have WebService::ILS installed 2 - prove t/00-load.t 3 - You should get a failure to load module and tests are skipped 4 - Apply patch 5 - prove t/00-load.t 6 - Module is not loaded, test are skipped Optional: 7 - Install WebService::ILS 5 - prove t/00-load.t 6 - Module is loaded, test passes --- t/00-load.t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/00-load.t b/t/00-load.t index 6c8b838..36a5bcf 100644 --- a/t/00-load.t +++ b/t/00-load.t @@ -89,6 +89,9 @@ sub is_testable { elsif ( $module_name =~ /Koha::SearchEngine::Elasticsearch::Search/xsm ) { @needed_module_names = ( 'Catmandu::Store::ElasticSearch' ); } + elsif ( $module_name =~ /^Koha::ExternalContent/xsm ) { + @needed_module_names = ( 'WebService::ILS' ); + } foreach my $current_name (@needed_module_names) { my $relative_pathname = $current_name; $relative_pathname =~ s/::/\//gxsm; -- 2.7.4