Branch Coverage

blib/lib/Mastodon/Role/UserAgent.pm
Criterion Covered Total %
branch 19 38 50.0


line true false branch
75 0 2 unless ($self->client_id and $self->client_secret)
113 0 22 if ($self->can('access_token') and $self->access_token)
120 0 22 if ($log->is_trace)
131 0 22 unless $method eq 'GET'
135 0 22 $method eq 'PATCH' ? :
147 0 22 unless $response->is_success
152 22 0 if ($response->decoded_content ne '{}')
153 22 0 if (not $url =~ /(?:apps|oauth)/ and $self->coerce_entities)
156 17 5 ref $payload eq 'ARRAY' ? :
160 17 5 if (ref $payload eq 'ARRAY') { }
0 5 elsif (ref $payload eq 'HASH') { }
161 0 17 if &any(sub { defined $_->{'error'}; } , @{$payload;})
164 0 0 if defined $payload->{'error'}
185 0 0 if $key eq 'file'
188 0 0 if ref $val eq 'ARRAY'
198 0 22 unless $url
200 22 0 unless (ref $url eq 'URI')
201 0 22 $url =~ m[^/oauth/] ? :
208 3 2 if (ref $val eq 'ARRAY') { }