diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-06-11 17:15:12 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-06-11 17:15:12 +0100 |
commit | 9ac04cfe3ff0102fea0f3bc0c8bae2972c1e05ce (patch) | |
tree | a2260567458358bf04dcab6cf24250e6fd354b88 /t/cobrand | |
parent | fb5e21c085e012d5454b1944594be919aa08da8a (diff) | |
parent | 246b05847931cbb48ed99daa799636e4477e5f4d (diff) |
Merge branch 'hounslow-confirm-ref-for-staff-on-report-pages'
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/hounslow.t | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/t/cobrand/hounslow.t b/t/cobrand/hounslow.t index 417bc7736..8fac848b1 100644 --- a/t/cobrand/hounslow.t +++ b/t/cobrand/hounslow.t @@ -9,6 +9,8 @@ $mech->create_contact_ok( email => 'pothole@example.org', ); +$mech->create_user_ok('staff@example.org', from_body => $hounslow_id); + my $tfl = $mech->create_body_ok( 2483, 'TfL'); $mech->create_contact_ok( body_id => $tfl->id, @@ -23,7 +25,8 @@ $mech->create_problems_for_body(1, $hounslow_id, 'An old problem made before Hou $mech->create_problems_for_body(1, $hounslow_id, 'A brand new problem made on the Hounslow site', { cobrand => 'hounslow' }); -$mech->create_problems_for_body(1, $hounslow_id, 'A brand new problem made on fixmystreet.com', { +my ($report) = $mech->create_problems_for_body(1, $hounslow_id, 'A brand new problem made on fixmystreet.com', { + external_id => 'ABC123', cobrand => 'fixmystreet' }); @@ -63,4 +66,16 @@ subtest "does not show TfL traffic lights category" => sub { }; }; +subtest "Shows external ID on report page to staff users only" => sub { + FixMyStreet::override_config { + ALLOWED_COBRANDS => 'hounslow', + }, sub { + $mech->get_ok('/report/' . $report->id); + $mech->content_lacks('ABC123'); + $mech->log_in_ok('staff@example.org'); + $mech->get_ok('/report/' . $report->id); + $mech->content_contains('ABC123'); + }; +}; + done_testing(); |