diff options
author | Dave Arter <davea@mysociety.org> | 2019-11-07 16:43:19 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2019-12-09 12:50:07 +0000 |
commit | 94abae58522ee2b1f2f881b8c93edfc8acafcd85 (patch) | |
tree | e2fde41d2f505746cc3571e20835ad0f4bc223cf | |
parent | ed6a1b7ce9cf30bbc9f26a1e3600b2a4059a97dc (diff) |
[TfL] Remove Email::TfL send method as no longer needed
-rw-r--r-- | perllib/FixMyStreet/SendReport/Email/TfL.pm | 11 | ||||
-rw-r--r-- | t/app/sendreport/email/tfl.t | 33 |
2 files changed, 0 insertions, 44 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email/TfL.pm b/perllib/FixMyStreet/SendReport/Email/TfL.pm deleted file mode 100644 index 383df9792..000000000 --- a/perllib/FixMyStreet/SendReport/Email/TfL.pm +++ /dev/null @@ -1,11 +0,0 @@ -package FixMyStreet::SendReport::Email::TfL; - -use Moo; -extends 'FixMyStreet::SendReport::Email::SingleBodyOnly'; - -has contact => ( - is => 'ro', - default => 'Traffic lights' -); - -1; diff --git a/t/app/sendreport/email/tfl.t b/t/app/sendreport/email/tfl.t deleted file mode 100644 index 8c6eeffa0..000000000 --- a/t/app/sendreport/email/tfl.t +++ /dev/null @@ -1,33 +0,0 @@ -use FixMyStreet::SendReport::Email::TfL; -use FixMyStreet::TestMech; - -my $mech = FixMyStreet::TestMech->new; - -my $bromley = $mech->create_body_ok(2482, 'Bromley Council'); -my $tfl = $mech->create_body_ok(2482, 'TfL'); - -$mech->create_contact_ok(email => 'council@example.com', body_id => $bromley->id, category => 'Graffiti'); -$mech->create_contact_ok(email => 'council@example.com', body_id => $bromley->id, category => 'Faulty street light'); -$mech->create_contact_ok(email => 'tfl@example.com', body_id => $tfl->id, category => 'Traffic lights'); - -my $row = FixMyStreet::DB->resultset('Problem')->new( { - id => 456, - bodies_str => '1000', - category => 'Faulty street light', - cobrand => '', -} ); - -my $e = FixMyStreet::SendReport::Email::TfL->new; -is $e->build_recipient_list($row), undef, 'no recipients if no body'; - -$e = FixMyStreet::SendReport::Email::TfL->new; -$e->add_body($bromley); -is $e->build_recipient_list($row), undef, 'no recipients if category missing'; - -$e = FixMyStreet::SendReport::Email::TfL->new; -$e->add_body($tfl); -is $e->build_recipient_list($row), 1, 'correct recipient list count'; -is_deeply $e->to, [ [ 'tfl@example.com', 'TfL' ] ], 'correct To line'; - -done_testing(); - |