Branch Coverage

blib/lib/Mojolicious/Plugin/OAuth2.pm
Criterion Covered Total %
branch 36 42 85.7


line true false branch
54 2 3 if ($config->{'providers'}) { }
56 2 0 if $config->{'ua'}
57 0 2 if $config->{'proxy'}
70 2 3 if $self->providers->{'mocked'}{'key'}
92 1 7 if exists $args->{'host'}
94 6 2 if defined $args->{'scope'}
95 1 7 if defined $args->{'state'}
96 4 4 if exists $args->{'authorize_query'}
102 14 12 @_ % 2 ? :
104 1 25 unless $self->providers->{$args->{'provider'}}
124 1 2 if $err
136 0 2 if exists $args->{'host'}
146 2 13 if $err
149 7 6 unless ($c->param("code"))
150 6 1 if $args->{'redirect'} // 1
164 3 3 if $c->param("state")
167 0 6 if exists $args->{'host'}
175 0 3 unless my $jwt = $self->providers->{$args->{'provider'}}{'jwt'}
195 0 8 if $code ne 200
196 5 3 $tx->res->headers->content_type =~ m[^(application/json|text/javascript)(;\s*charset=\S+)?$]u ? :
206 46 1 unless $provider->{'well_known_url'}