Branch Coverage

blib/lib/Mojolicious/Plugin/StripePayment.pm
Criterion Covered Total %
branch 26 48 54.1


line true false branch
301 3 0 if $$config{'mocked'}
314 0 1 unless $$args{'id'}
317 0 4 if defined $$args{$k}
320 0 1 if (defined $form{'statement_descriptor'} and 22 < length $form{'statement_descriptor'})
341 1 71 if defined $$args{$k}
346 8 0 unless defined $form{'description'}
347 0 8 if ref $form{'metadata'}
348 2 6 if $c->param('stripeEmail')
349 0 8 if ref $form{'shipping'}
351 7 1 $form{'capture'} // $self->auto_capture ? :
353 0 8 if (defined $form{'statement_descriptor'} and 22 < length $form{'statement_descriptor'})
357 1 7 unless $form{'amount'}
358 0 7 unless $form{'currency'}
359 1 6 unless $form{'source'}
374 0 0 unless my $data = delete $$args{$ns}
392 5 0 if ($c->req->url->to_abs->userinfo eq "${secret}:") { }
394 5 0 $c->param('capture') // 1 ? :
397 5 0 $secret =~ /test/ ? :
409 1 0 if ($c->req->url->to_abs->userinfo eq "${secret}:") { }
412 1 0 $secret =~ /test/ ? :
424 0 0 if ($c->req->url->to_abs->userinfo ne "${secret}:") { }
0 0 elsif (my $id = $c->param('id')) { }
432 0 0 unless $c->param('id')
457 1 6 if ($$error{'code'} or $$json{'error'})