Branch Coverage

blib/lib/Mojolicious/Plugin/StripePayment.pm
Criterion Covered Total %
branch 23 44 52.2


line true false branch
299 1 0 if $$config{'mocked'}
312 0 1 unless $$args{'id'}
315 0 4 if defined $$args{$k}
318 0 1 if (defined $form{'statement_descriptor'} and 22 < length $form{'statement_descriptor'})
339 1 44 if defined $$args{$k}
344 5 0 unless defined $form{'description'}
345 0 5 if ref $form{'metadata'}
346 2 3 if $c->param('stripeEmail')
347 0 5 if ref $form{'shipping'}
351 0 5 if (defined $form{'statement_descriptor'} and 22 < length $form{'statement_descriptor'})
355 1 4 unless $form{'amount'}
356 0 4 unless $form{'currency'}
357 1 3 unless $form{'source'}
372 0 0 unless my $data = delete $$args{$ns}
390 0 3 if ($c->param('token') and $c->req->url->userinfo eq "${secret}:") { }
395 2 1 $c->param('capture') // 1 ? :
398 3 0 $secret =~ /test/ ? :
407 0 1 if ($c->param('token') and $c->req->url->userinfo eq "${secret}:") { }
413 1 0 $secret =~ /test/ ? :
422 0 0 if ($c->param('token') and $c->req->url->userinfo eq "${secret}:") { }
0 0 elsif (my $id = $c->param('id')) { }
430 0 0 unless $c->param('id')