blob: d7be4db43b5046645bb6a8cfd9fbcefe8fc6867f [file] [log] [blame]
Akrond8db6722022-12-06 10:05:24 +01001use Test::More;
2use Test::Mojo;
3use Test::Output;
4use Data::Dumper;
5
6my @loaded = grep( /Kalamar\//, keys %INC);
7
8is(scalar (@loaded), 0, 'No Kalamar libraries loaded');
9
10$ENV{KALAMAR_PLUGINS} = 'Piwik,Auth';
11
12my $t = Test::Mojo->new(Kalamar => {
13 Kalamar => {
14 plugins => ['Auth']
15 }
16});
17
18my @loaded = grep( /Kalamar[\/\\]Plugin/, keys %INC);
19
20isnt(scalar (@loaded), 0, 'Kalamar libraries loaded');
21
22is(scalar grep( /Auth/, @loaded), 1, 'Auth plugin loaded');
23is(scalar grep( /Piwik/, @loaded), 1, 'Auth plugin loaded');
24is(scalar grep( /Unknown/, @loaded), 0, 'Unknown plugin not loaded');
25
26done_testing;
27__END__