summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-11-02 12:05:14 -0700
committerMark Wells <mark@freeside.biz>2016-11-02 12:56:06 -0700
commitfc07fac1431e216f22bc84116638da7665c0a427 (patch)
treeea15a2de6d736aa5b92fb1f9f295df6a226f9a5f
parent569c8e243c450b46cc4d28d513a4e83d6128d03c (diff)
fix detection of a successful test
-rw-r--r--FS/FS/Test.pm2
-rwxr-xr-xFS/t/suite/03-realtime_pay.t2
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 ) {