diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-07-08 14:00:48 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-07-09 18:04:47 +0100 |
commit | bc4b5d5b4e32f4b38775f0409146b694870147b3 (patch) | |
tree | 62438c7c518011c847868ea9ee0a15b1e23a813b /t/cobrand | |
parent | b078fc7a95ba42e62c3c905c45b7bed085619e6e (diff) |
Allow cobrands to disable admin resending.
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/bexley.t | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/t/cobrand/bexley.t b/t/cobrand/bexley.t index 40908b869..f72b7e7c4 100644 --- a/t/cobrand/bexley.t +++ b/t/cobrand/bexley.t @@ -53,6 +53,7 @@ FixMyStreet::override_config { $mech->content_contains('Bexley'); }; + my $report; foreach my $test ( { category => 'Abandoned and untaxed vehicles', email => 1, code => 'ABAN', extra => { 'name' => 'burnt', description => 'Was it burnt?', 'value' => 'Yes' } }, @@ -79,9 +80,9 @@ FixMyStreet::override_config { { category => 'Lamp post', code => 'LAMP', email => 'p1.*thirdparty', extra => { 'name' => 'dangerous', description => 'Was it dangerous?', 'value' => 'Yes' } }, ) { - my ($report) = $mech->create_problems_for_body(1, $body->id, 'On Road', { + ($report) = $mech->create_problems_for_body(1, $body->id, 'On Road', { category => $test->{category}, cobrand => 'bexley', - latitude => 51.408484, longitude => 0.074653, + latitude => 51.408484, longitude => 0.074653, areas => '2494', }); if ($test->{extra}) { $report->set_extra_fields(ref $test->{extra} eq 'ARRAY' ? @{$test->{extra}} : $test->{extra}); @@ -110,6 +111,14 @@ FixMyStreet::override_config { }; } + subtest 'resend is disabled in admin' => sub { + my $user = $mech->log_in_ok('super@example.org'); + $user->update({ from_body => $body, is_superuser => 1 }); + $mech->get_ok('/admin/report_edit/' . $report->id); + $mech->content_contains('View report on site'); + $mech->content_lacks('Resend report'); + }; + }; subtest 'nearest road returns correct road' => sub { |