aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
Diffstat (limited to 't/app')
-rw-r--r--t/app/controller/admin.t7
-rw-r--r--t/app/helpers/send_email.t3
2 files changed, 7 insertions, 3 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index 7f8590747..4e2ec82fe 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -136,7 +136,7 @@ subtest 'check summary counts' => sub {
my $host = FixMyStreet->config('BASE_URL');
$mech->get_ok('/admin/council_contacts/2650');
$mech->content_contains('Aberdeen City Council');
-$mech->content_contains('AB15 8RN');
+$mech->content_like(qr{AB\d\d});
$mech->content_contains("$host/around");
subtest 'check contact creation' => sub {
@@ -602,7 +602,7 @@ for my $test (
},
changes => {
text => 'this is a twice changed update',
- state => 'hidden',
+ state => 'confirmed',
},
log_count => 7,
log_entries => [qw/edit state_change state_change edit edit edit edit/],
@@ -629,6 +629,9 @@ for my $test (
$update->discard_changes;
is $update->$_, $test->{changes}->{$_} for grep { $_ ne 'email' } keys %{ $test->{changes} };
+ if ( $test->{changes}{state} && $test->{changes}{state} eq 'confirmed' ) {
+ isnt $update->confirmed, undef;
+ }
if ( $test->{user} ) {
is $update->user->id, $test->{user}->id, 'update user';
diff --git a/t/app/helpers/send_email.t b/t/app/helpers/send_email.t
index ac7e5b5c2..8c043f701 100644
--- a/t/app/helpers/send_email.t
+++ b/t/app/helpers/send_email.t
@@ -9,7 +9,7 @@ BEGIN {
FixMyStreet->test_mode(1);
}
-use Test::More tests => 5;
+use Test::More tests => 6;
use Email::Send::Test;
use Path::Class;
@@ -44,6 +44,7 @@ is scalar(@emails), 1, "caught one email";
# Get the email, check it has a date and then strip it out
my $email_as_string = $emails[0]->as_string;
ok $email_as_string =~ s{\s+Date:\s+\S.*?$}{}xms, "Found and stripped out date";
+ok $email_as_string =~ s{\s+Message-ID:\s+\S.*?$}{}xms, "Found and stripped out message ID (contains epoch)";
my $expected_email_content = file(__FILE__)->dir->file('send_email_sample.txt')->slurp;
my $name = FixMyStreet->config('CONTACT_NAME');