diff options
author | Mark Wells <mark@freeside.biz> | 2016-11-02 12:05:14 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-11-02 12:56:06 -0700 |
commit | fc07fac1431e216f22bc84116638da7665c0a427 (patch) | |
tree | ea15a2de6d736aa5b92fb1f9f295df6a226f9a5f | |
parent | 569c8e243c450b46cc4d28d513a4e83d6128d03c (diff) |
fix detection of a successful test
-rw-r--r-- | FS/FS/Test.pm | 2 | ||||
-rwxr-xr-x | FS/t/suite/03-realtime_pay.t | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/FS/FS/Test.pm b/FS/FS/Test.pm index 9c77417fe..3b1c0921c 100644 --- a/FS/FS/Test.pm +++ b/FS/FS/Test.pm @@ -211,7 +211,7 @@ and then pass the form object to L</post> to submit it. sub form { my $self = shift; my $name = shift; - my ($form) = grep { $_->attr('name') eq $name } $self->forms; + my ($form) = grep { ($_->attr('name') || '') eq $name } $self->forms; $form; } diff --git a/FS/t/suite/03-realtime_pay.t b/FS/t/suite/03-realtime_pay.t index 17456bb15..fb2aa5741 100755 --- a/FS/t/suite/03-realtime_pay.t +++ b/FS/t/suite/03-realtime_pay.t @@ -26,7 +26,7 @@ $FS->post($form); # on success, gives a redirect to the payment receipt my $paynum; -if ($FS->redirect =~ m[^/view/cust_pay.html\?(\d+)]) { +if ($FS->redirect =~ m[^/view/cust_pay.html\?paynum=(\d+)]) { pass('payment processed'); $paynum = $1; } elsif ( $FS->error ) { |