aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/sendreport/email.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/sendreport/email.t')
-rw-r--r--t/app/sendreport/email.t17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/app/sendreport/email.t b/t/app/sendreport/email.t
index 6b292725b..3e6db4f67 100644
--- a/t/app/sendreport/email.t
+++ b/t/app/sendreport/email.t
@@ -20,6 +20,8 @@ my $contact = $mech->create_contact_ok(
);
my $row = FixMyStreet::DB->resultset('Problem')->new( {
+ latitude => 51.023569,
+ longitude => -3.099055,
bodies_str => '1000',
category => 'category',
cobrand => '',
@@ -67,4 +69,19 @@ foreach my $test ( {
};
}
+$body->body_areas->delete;
+$body->body_areas->create({ area_id => 2429 });
+
+subtest 'Test special behaviour' => sub {
+ my $e = FixMyStreet::SendReport::Email->new;
+ $contact->update( { state => 'confirmed', email => 'SPECIAL' } );
+ $e->add_body( $body );
+ FixMyStreet::override_config {
+ MAPIT_URL => 'http://mapit.uk/'
+ }, sub {
+ my ($e) = $e->build_recipient_list( $row, {} );
+ like $e->[0], qr/tauntondeane/, 'correct recipient';
+ };
+};
+
done_testing();