aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand/bexley.t
diff options
context:
space:
mode:
Diffstat (limited to 't/cobrand/bexley.t')
-rw-r--r--t/cobrand/bexley.t13
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 {