Branch Coverage

blib/lib/Mojolicious/Plugin/StripePayment.pm
Criterion Covered Total %
branch 27 48 56.2


line true false branch
300 4 0 if $$config{'mocked'}
313 0 1 unless $$args{'id'}
316 0 4 if defined $$args{$k}
319 0 1 if (defined $form{'statement_descriptor'} and 22 < length $form{'statement_descriptor'})
340 1 80 if defined $$args{$k}
345 9 0 unless defined $form{'description'}
346 2 7 if $c->param('stripeEmail')
348 8 1 $form{'capture'} // $self->auto_capture ? :
350 1 8 if ref $$args{'metadata'}
351 0 9 if ref $$args{'shipping'}
353 0 9 if (defined $form{'statement_descriptor'} and 22 < length $form{'statement_descriptor'})
357 1 8 unless $form{'amount'}
358 0 8 unless $form{'currency'}
359 1 7 unless $form{'source'}
392 0 0 $k =~ /^metadata\[\w+\]/ ? :
401 5 0 if ($c->req->url->to_abs->userinfo eq "${secret}:") { }
403 5 0 $c->param('capture') // 1 ? :
406 5 0 $secret =~ /test/ ? :
419 1 0 if ($c->req->url->to_abs->userinfo eq "${secret}:") { }
422 1 0 $secret =~ /test/ ? :
434 0 0 if ($c->req->url->to_abs->userinfo ne "${secret}:") { }
0 0 elsif (my $id = $c->param('id')) { }
442 0 0 unless $c->param('id')
467 1 7 if ($$error{'code'} or $$json{'error'})