diff options
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/fixmystreet.t | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/t/cobrand/fixmystreet.t b/t/cobrand/fixmystreet.t index eda93e187..4d76e43c6 100644 --- a/t/cobrand/fixmystreet.t +++ b/t/cobrand/fixmystreet.t @@ -5,6 +5,12 @@ my $mech = FixMyStreet::TestMech->new; my $body = $mech->create_body_ok( 2514, 'Birmingham' ); +my $contact = $mech->create_contact_ok( + body_id => $body->id, + category => 'Traffic lights', + email => 'lights@example.com' +); + my $data; FixMyStreet::override_config { MAPIT_URL => 'http://mapit.uk/', @@ -39,7 +45,27 @@ FixMyStreet::override_config { $mech->get_ok('/about/council-dashboard'); is $mech->uri->path, '/reports/Birmingham/summary'; $mech->content_contains('Top 5 wards'); + $mech->content_contains('Where we send Birmingham'); + $mech->content_contains('lights@example.com'); + + $body->send_method('Open311'); + $body->update(); + $mech->get_ok('/about/council-dashboard'); + $mech->content_contains('Reports to Birmingham are currently sent directly'); + + $body->send_method('Refused'); + $body->update(); + $mech->get_ok('/about/council-dashboard'); + $mech->content_contains('Birmingham currently does not accept'); + + $body->send_method('Noop'); + $body->update(); + $mech->get_ok('/about/council-dashboard'); + $mech->content_contains('Reports are currently not being sent'); + $mech->log_out_ok(); + $mech->get_ok('/reports'); + $mech->content_lacks('Where we send Birmingham'); }; END { |