aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2019-09-19 12:18:24 +0100
committerStruan Donald <struan@exo.org.uk>2019-09-27 17:43:38 +0100
commit6b01232a4108accdb4bc5f2cbca1044c1b317972 (patch)
treeb46843f6faa90586f1e36676485e678220712844 /t/app/controller/admin
parent6a1ad33c07de846f15af48c7a01eb567d9263da3 (diff)
do not send triage comments in alerts
add a check into the Alerts script to skip comments that have `triage_report` set in extra. Otherwise we send these our in new_updates alerts.
Diffstat (limited to 't/app/controller/admin')
-rw-r--r--t/app/controller/admin/triage.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/app/controller/admin/triage.t b/t/app/controller/admin/triage.t
index 81eb28a5d..0bc253150 100644
--- a/t/app/controller/admin/triage.t
+++ b/t/app/controller/admin/triage.t
@@ -1,4 +1,5 @@
use FixMyStreet::TestMech;
+use FixMyStreet::Script::Alerts;
my $mech = FixMyStreet::TestMech->new;
@@ -76,6 +77,16 @@ FixMyStreet::override_config {
my $report_url = '/report/' . $report->id;
$mech->get_ok($report_url);
+ my $alert = FixMyStreet::App->model('DB::Alert')->create(
+ {
+ user => $user2,
+ alert_type => 'new_updates',
+ parameter => $report->id,
+ parameter2 => '',
+ confirmed => 1,
+ }
+ );
+
$mech->content_contains('Traffic lights');
$mech->submit_form_ok( {
@@ -106,6 +117,10 @@ FixMyStreet::override_config {
$mech->log_out_ok;
$mech->get_ok($report_url);
$mech->content_lacks('Report triaged from Potholes to Traffic lights');
+
+ $mech->clear_emails_ok;
+ FixMyStreet::Script::Alerts::send();
+ $mech->email_count_is(0);
};
};