aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/cobrand/bucks.t7
-rw-r--r--templates/email/buckinghamshire/other-reported.html4
-rw-r--r--templates/email/buckinghamshire/other-reported.txt4
-rw-r--r--templates/email/default/other-reported.html4
-rw-r--r--templates/email/default/other-reported.txt4
-rw-r--r--templates/email/fixamingata/other-reported.html4
-rw-r--r--templates/email/fixamingata/other-reported.txt4
7 files changed, 16 insertions, 15 deletions
diff --git a/t/cobrand/bucks.t b/t/cobrand/bucks.t
index 74684c27e..e2b4214da 100644
--- a/t/cobrand/bucks.t
+++ b/t/cobrand/bucks.t
@@ -76,13 +76,14 @@ subtest 'pothole on road not sent to extra email' => sub {
};
($report) = $mech->create_problems_for_body(1, $district->id, 'Off Road', {
- category => 'Flytipping', cobrand => 'fixmystreet',
+ category => 'Flytipping', cobrand => 'buckinghamshire',
latitude => 51.813173, longitude => -0.826741,
});
subtest 'flytipping off road sent to extra email' => sub {
FixMyStreet::Script::Reports::send();
- my $email = $mech->get_email;
- is $email->header('To'), '"Chiltern" <flytipping@chiltern>';
+ my @email = $mech->get_email;
+ is $email[0]->header('To'), '"Chiltern" <flytipping@chiltern>';
+ like $mech->get_text_body_from_email($email[1]), qr/Please note that Buckinghamshire County Council is not responsible/;
$report->discard_changes;
is $report->external_id, undef, 'Report has right external ID';
};
diff --git a/templates/email/buckinghamshire/other-reported.html b/templates/email/buckinghamshire/other-reported.html
index fe03376f5..584c5b89e 100644
--- a/templates/email/buckinghamshire/other-reported.html
+++ b/templates/email/buckinghamshire/other-reported.html
@@ -12,8 +12,8 @@ INCLUDE '_email_top.html';
[% start_padded_box %]
<h1 style="[% h1_style %]">Your report has been&nbsp;logged</h1>
<p style="[% p_style %]">Your report to [% report.body %] has been logged on [% site_name %].</p>
-[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
-<p style="[% p_style %]">Please note that [% c.cobrand.council_name %] is not responsible for this type
+[% IF cobrand.is_council && !cobrand.owns_problem( report ) %]
+<p style="[% p_style %]">Please note that [% cobrand.council_name %] is not responsible for this type
of report, so it will instead be sent to [% report.body %].</p>
[% ELSE %]
[% TRY %][% INCLUDE '_council_reference.html' problem=report %][% CATCH file %][% END %]
diff --git a/templates/email/buckinghamshire/other-reported.txt b/templates/email/buckinghamshire/other-reported.txt
index 50a879d79..7f78617e0 100644
--- a/templates/email/buckinghamshire/other-reported.txt
+++ b/templates/email/buckinghamshire/other-reported.txt
@@ -4,8 +4,8 @@ Hello [% report.name %],
Your report to [% report.body %] has been logged on [% site_name %].
-[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
-Please note that [% c.cobrand.council_name %] is not responsible for this type
+[% IF cobrand.is_council && !cobrand.owns_problem( report ) %]
+Please note that [% cobrand.council_name %] is not responsible for this type
of report, so it will instead be sent to [% report.body %].
[% ELSE %]
[% TRY %][% INCLUDE '_council_reference.txt' problem=report %][% CATCH file %][% END %]
diff --git a/templates/email/default/other-reported.html b/templates/email/default/other-reported.html
index fe03376f5..584c5b89e 100644
--- a/templates/email/default/other-reported.html
+++ b/templates/email/default/other-reported.html
@@ -12,8 +12,8 @@ INCLUDE '_email_top.html';
[% start_padded_box %]
<h1 style="[% h1_style %]">Your report has been&nbsp;logged</h1>
<p style="[% p_style %]">Your report to [% report.body %] has been logged on [% site_name %].</p>
-[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
-<p style="[% p_style %]">Please note that [% c.cobrand.council_name %] is not responsible for this type
+[% IF cobrand.is_council && !cobrand.owns_problem( report ) %]
+<p style="[% p_style %]">Please note that [% cobrand.council_name %] is not responsible for this type
of report, so it will instead be sent to [% report.body %].</p>
[% ELSE %]
[% TRY %][% INCLUDE '_council_reference.html' problem=report %][% CATCH file %][% END %]
diff --git a/templates/email/default/other-reported.txt b/templates/email/default/other-reported.txt
index 1dc8d0b44..7b1230555 100644
--- a/templates/email/default/other-reported.txt
+++ b/templates/email/default/other-reported.txt
@@ -4,8 +4,8 @@ Hello [% report.name %],
Your report to [% report.body %] has been logged on [% site_name %].
-[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
-Please note that [% c.cobrand.council_name %] is not responsible for this type
+[% IF cobrand.is_council && !cobrand.owns_problem( report ) %]
+Please note that [% cobrand.council_name %] is not responsible for this type
of report, so it will instead be sent to [% report.body %].
[% ELSE %]
[% TRY %][% INCLUDE '_council_reference.txt' problem=report %][% CATCH file %][% END %]
diff --git a/templates/email/fixamingata/other-reported.html b/templates/email/fixamingata/other-reported.html
index 3ba29dcb0..0b0160696 100644
--- a/templates/email/fixamingata/other-reported.html
+++ b/templates/email/fixamingata/other-reported.html
@@ -12,8 +12,8 @@ INCLUDE '_email_top.html';
[% start_padded_box %]
<h1 style="[% h1_style %]">Din rapport har&nbsp;loggats</h1>
<p style="[% p_style %]">Din rapport till [% report.body %] har blivit loggad på [% site_name %].
-[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
-Eftersom [% c.cobrand.council_name %] inte är ansvarig för den här typen av
+[% IF cobrand.is_council && !cobrand.owns_problem( report ) %]
+Eftersom [% cobrand.council_name %] inte är ansvarig för den här typen av
rapporter, så kommer rapporten istället att skickas till [% report.body %].
[% END %]
</p>
diff --git a/templates/email/fixamingata/other-reported.txt b/templates/email/fixamingata/other-reported.txt
index 2c50c765c..e39adf527 100644
--- a/templates/email/fixamingata/other-reported.txt
+++ b/templates/email/fixamingata/other-reported.txt
@@ -4,8 +4,8 @@ Hej [% report.name %],
Din rapport till [% report.body %] har blivit loggad på [% site_name %].
-[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
-Eftersom [% c.cobrand.council_name %] inte är ansvarig för den här typen av
+[% IF cobrand.is_council && !cobrand.owns_problem( report ) %]
+Eftersom [% cobrand.council_name %] inte är ansvarig för den här typen av
rapporter, så kommer rapporten istället att skickas till [% report.body %].
[% END %]