From 20e563c0efb98747f765e69fd97dadef11b18a95 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 2 Oct 2017 14:58:01 +0100 Subject: do not send blank problem update alerts --- t/app/controller/alert_new.t | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 't/app/controller') diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t index 97a19b3b8..33b3ae92b 100644 --- a/t/app/controller/alert_new.t +++ b/t/app/controller/alert_new.t @@ -475,7 +475,7 @@ subtest "Test normal alert signups and that alerts are sent" => sub { $mech->delete_user($user2); }; -subtest "Test alerts are correct for no-text updates" => sub { +subtest "Test alerts are not sent for no-text updates" => sub { $mech->delete_user( 'reporter@example.com' ); $mech->delete_user( 'alerts@example.com' ); @@ -540,14 +540,7 @@ subtest "Test alerts are correct for no-text updates" => sub { FixMyStreet::Script::Alerts::send(); }; - $mech->email_count_is(1); - my $email = $mech->get_email; - my $body = $mech->get_text_body_from_email($email); - like $body, qr/The following updates have been left on this report:/, 'email is about updates to existing report'; - like $body, qr/Staff User/, 'Update comes from correct user'; - - my @urls = $mech->get_link_from_email($email, 1); - is $urls[0], "http://www.example.org/report/" . $report_id, "Correct report URL in email"; + $mech->email_count_is(0); $mech->delete_user($user1); $mech->delete_user($user2); -- cgit v1.2.3