Bug 16502: Adjust test for GetPlugins
The current test assumes that GetPlugins will return the test plugin as the first one in the array. This is not correct. This patch adjusts the test to a grep. Test plan: Run the test. Bonus: Add additional plugins. Run the test again. Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
959d69fa01
commit
6ad5770786
1 changed files with 2 additions and 1 deletions
|
@ -43,7 +43,8 @@ ok( $plugin->get_qualified_table_name('mytable') eq 'koha_plugin_test_mytable',
|
|||
ok( $plugin->get_plugin_http_path() eq '/plugin/Koha/Plugin/Test', 'Test $plugin->get_plugin_http_path()' );
|
||||
|
||||
my @plugins = Koha::Plugins->new({ enable_plugins => 1 })->GetPlugins( 'report' );
|
||||
ok( $plugins[0]->get_metadata()->{'name'} eq 'Test Plugin', "Koha::Plugins::GetPlugins functions correctly" );
|
||||
my @names = map { $_->get_metadata()->{'name'} } @plugins;
|
||||
is( scalar grep( /^Test Plugin$/, @names), 1, "Koha::Plugins::GetPlugins functions correctly" );
|
||||
|
||||
SKIP: {
|
||||
my $plugins_dir = C4::Context->config("pluginsdir");
|
||||
|
|
Loading…
Reference in a new issue