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