From: Jonathan Prykop Date: Wed, 4 Jan 2017 05:05:34 +0000 (-0600) Subject: 71513: Card tokenization [v3 test tweak] X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=2e28dbd1a28f60d714a272be5c29b56bc079142d 71513: Card tokenization [v3 test tweak] --- diff --git a/FS/t/suite/13-tokenization.t b/FS/t/suite/13-tokenization.t index 019b61c1b..a7226e60d 100755 --- a/FS/t/suite/13-tokenization.t +++ b/FS/t/suite/13-tokenization.t @@ -30,10 +30,10 @@ ok( !$err, 'schema upgrade' ) or BAIL_OUT('Error string: '.$!); # some pre-upgrade cleanup, upgrade will fail if these are still configured foreach my $cust_main ( $fs->qsearch('cust_main') ) { my @count = $fs->qsearch('agent_payment_gateway', { agentnum => $cust_main->agentnum } ); - if (@count > 1) { + if (@count > 0) { note("DELETING CARDTYPE GATEWAYS"); foreach my $apg (@count) { - $err = $apg->delete if $apg->cardtype; + $err = $apg->delete; last if $err; } @count = $fs->qsearch('agent_payment_gateway', { agentnum => $cust_main->agentnum } );