aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Questionnaire.pm3
-rw-r--r--perllib/FixMyStreet/TestMech.pm4
2 files changed, 4 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
index 1b338732b..1ff57e920 100755
--- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm
+++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
@@ -46,6 +46,7 @@ sub check_questionnaire : Private {
$c->stash->{problem} = $problem;
$c->stash->{answered_ever_reported} = $problem->user->answered_ever_reported;
+ $c->stash->{been_fixed} = $c->get_param('been_fixed') || '';
}
=head2 submit
@@ -223,7 +224,7 @@ sub submit_standard : Private {
sub process_questionnaire : Private {
my ( $self, $c ) = @_;
- map { $c->stash->{$_} = $c->get_param($_) || '' } qw(been_fixed reported another update);
+ map { $c->stash->{$_} = $c->get_param($_) || '' } qw(reported another update);
$c->stash->{update} = Utils::cleanup_text($c->stash->{update}, { allow_multiline => 1 });
diff --git a/perllib/FixMyStreet/TestMech.pm b/perllib/FixMyStreet/TestMech.pm
index ac2ac023d..c5b72a7cf 100644
--- a/perllib/FixMyStreet/TestMech.pm
+++ b/perllib/FixMyStreet/TestMech.pm
@@ -247,7 +247,7 @@ sub get_text_body_from_email {
}
sub get_link_from_email {
- my ($mech, $email, $multiple) = @_;
+ my ($mech, $email, $multiple, $mismatch) = @_;
unless ($email) {
$email = $mech->get_email;
$mech->clear_emails_ok;
@@ -261,7 +261,7 @@ sub get_link_from_email {
if (@links) {
# Must be an HTML part now, first two links are in header
my @html_links = $part->body =~ m{https?://[^"]+}g;
- is $links[0], $html_links[2], 'HTML link matches text link';
+ is $links[0], $html_links[2], 'HTML link matches text link' unless $mismatch;
} else {
@links = $part->body =~ m{https?://\S+}g;
ok @links, "Found links in email '@links'";