aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-04-04 13:05:58 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-04-04 13:05:58 +0100
commit40e88138343f7add390f54ab04d59a3a2042dffd (patch)
tree4fa59889895f04d131ed2133e28d25fd554a3af1 /t
parentfe22a3815dbed8ab6afb43162b7814a45ca7a423 (diff)
Add test for update name in HTML part of email.
Diffstat (limited to 't')
-rw-r--r--t/app/controller/alert_new.t5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t
index 4e8fd1b29..27371e4a9 100644
--- a/t/app/controller/alert_new.t
+++ b/t/app/controller/alert_new.t
@@ -451,9 +451,8 @@ subtest "Test normal alert signups and that alerts are sent" => sub {
is $count, 5, 'Three emails, with five matching lines in them';
my $email = $emails[0];
- my $body = $mech->get_text_body_from_email($email);
- like $body, qr/Other User/, 'Update name given';
- unlike $body, qr/Anonymous User/, 'Update name not given';
+ is +(my $c = () = $email->as_string =~ /Other User/g), 2, 'Update name given, twice';
+ unlike $email->as_string, qr/Anonymous User/, 'Update name not given';
# The update alert was to the problem reporter, so has a special update URL
$mech->log_out_ok;