Branch Coverage

blib/lib/Mojolicious/Plugin/SimpleAuthorization.pm
Criterion Covered Total %
branch 20 26 76.9


line true false branch
15 0 1 unless ref $conf->{'on_assert_failure'} eq 'CODE'
23 5 8 if ($result == 0)
25 5 0 if defined $conf->{'on_assert_failure'}
37 6 10 ref $_[-1] eq 'CODE' ? :
41 15 1 unless ref $tests eq 'ARRAY'
44 6 10 if ($cb)
45 2 4 if $cbresult = &$cb($user, $roles)
49 12 2 unless (defined $cbresult)
52 12 0 if (defined $conf->{'superuser'})
53 12 0 if (ref $conf->{'superuser'} eq 'CODE') { }
54 4 8 if $conf->{'superuser'}->($user, $roles)
57 0 0 if $$user{$conf->{'superuser'}}
60 4 4 if $roles->{$_}