From becb211aac950c1557d634bd0b5aba402081d483 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 28 Nov 2011 17:17:58 +0000 Subject: add in postcode to email alert titles --- t/app/controller/alert_new.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 't/app/controller/alert_new.t') diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t index 580a5ad9a..8231b1996 100644 --- a/t/app/controller/alert_new.t +++ b/t/app/controller/alert_new.t @@ -452,8 +452,9 @@ subtest "Test normal alert signups and that alerts are sent" => sub { $count++ if $_->body =~ /The following updates have been left on this problem:/; $count++ if $_->body =~ /The following new problems have been reported to City of\s*Edinburgh Council:/; $count++ if $_->body =~ /The following nearby problems have been added:/; + $count++ if $_->body =~ / - Testing, EH1 1BB/; } - is $count, 3, 'Three emails with the right things in them'; + is $count, 5, 'Three emails with the right things in them'; my $email = $emails[0]; like $email->body, qr/Other User/, 'Update name given'; -- cgit v1.2.3 From 7137be3b574611d526b047798013d9c785ef4242 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 29 Nov 2011 18:04:15 +0000 Subject: make the test and description match --- t/app/controller/alert_new.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/app/controller/alert_new.t') diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t index 8231b1996..950666d2d 100644 --- a/t/app/controller/alert_new.t +++ b/t/app/controller/alert_new.t @@ -454,7 +454,7 @@ subtest "Test normal alert signups and that alerts are sent" => sub { $count++ if $_->body =~ /The following nearby problems have been added:/; $count++ if $_->body =~ / - Testing, EH1 1BB/; } - is $count, 5, 'Three emails with the right things in them'; + is $count, 5, 'Five emails with the right things in them'; my $email = $emails[0]; like $email->body, qr/Other User/, 'Update name given'; -- cgit v1.2.3 From bc7b6ef0d99a10f5c5d370df195cb5f80f145b0a Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 6 Jan 2012 14:18:16 +0000 Subject: Fix test for when long domain name pushes things over one line. --- t/app/controller/alert_new.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/app/controller/alert_new.t') diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t index 950666d2d..5ea73625a 100644 --- a/t/app/controller/alert_new.t +++ b/t/app/controller/alert_new.t @@ -452,7 +452,7 @@ subtest "Test normal alert signups and that alerts are sent" => sub { $count++ if $_->body =~ /The following updates have been left on this problem:/; $count++ if $_->body =~ /The following new problems have been reported to City of\s*Edinburgh Council:/; $count++ if $_->body =~ /The following nearby problems have been added:/; - $count++ if $_->body =~ / - Testing, EH1 1BB/; + $count++ if $_->body =~ / -\s+Testing, EH1 1BB/; } is $count, 5, 'Five emails with the right things in them'; -- cgit v1.2.3