aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-10-10 08:04:21 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-10-10 08:20:28 +0100
commit68e18ffea411f6f6fbb0b4424c6aa6c14fd8cd00 (patch)
treeb5e8c636fcdf33f8682499556beb3ae082cfc587 /t/app/controller
parent865d2fc589ec4c43fea6c477b78986676eac745e (diff)
[Oxfordshire] Remove raise defect/inspected code.
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/report_inspect.t16
1 files changed, 1 insertions, 15 deletions
diff --git a/t/app/controller/report_inspect.t b/t/app/controller/report_inspect.t
index ef05288c7..d319f778a 100644
--- a/t/app/controller/report_inspect.t
+++ b/t/app/controller/report_inspect.t
@@ -144,7 +144,7 @@ FixMyStreet::override_config {
$mech->get_ok("/report/$report_id");
$mech->submit_form_ok({ button => 'save', with_fields => {
public_update => "This is a public update.", include_update => "1",
- state => 'action scheduled', raise_defect => 1,
+ state => 'action scheduled',
} });
$mech->get_ok("/report/$report_id");
$mech->submit_form_ok({ with_fields => {
@@ -153,28 +153,23 @@ FixMyStreet::override_config {
$report->discard_changes;
my $comment = ($report->comments( undef, { order_by => { -desc => 'id' } } )->all)[1]->text;
is $comment, "This is a public update.", 'Update was created';
- is $report->get_extra_metadata('inspected'), 1, 'report marked as inspected';
is $report->user->get_extra_metadata('reputation'), $reputation, "User reputation wasn't changed";
$mech->get_ok("/report/$report_id");
my $meta = $mech->extract_update_metas;
like $meta->[0], qr/State changed to: Action scheduled/, 'First update mentions action scheduled';
- like $meta->[2], qr/Posted by .*defect raised/, 'Update mentions defect raised';
$user->unset_extra_metadata('categories');
$user->update;
};
subtest "test update is required when instructing" => sub {
- $report->unset_extra_metadata('inspected');
$report->update;
- $report->inspection_log_entry->delete;
$report->comments->delete_all;
$mech->get_ok("/report/$report_id");
$mech->submit_form_ok({ button => 'save', with_fields => { public_update => undef, include_update => "1" } });
is_deeply $mech->page_errors, [ "Please provide a public update for this report." ], 'errors match';
$report->discard_changes;
is $report->comments->count, 0, "Update wasn't created";
- is $report->get_extra_metadata('inspected'), undef, 'report not marked as inspected';
};
subtest "test location changes" => sub {
@@ -627,7 +622,6 @@ FixMyStreet::override_config {
subtest "test positive reputation" => sub {
$user->user_body_permissions->create({ body => $oxon, permission_type => 'report_instruct' });
- $report->unset_extra_metadata('inspected');
$report->update;
$report->inspection_log_entry->delete if $report->inspection_log_entry;
my $reputation = $report->user->get_extra_metadata("reputation") || 0;
@@ -636,24 +630,16 @@ FixMyStreet::override_config {
state => 'in progress', include_update => undef,
} });
$report->discard_changes;
- is $report->get_extra_metadata('inspected'), undef, 'report not marked as inspected';
$mech->submit_form_ok({ button => 'save', with_fields => {
state => 'action scheduled', include_update => undef,
} });
$report->discard_changes;
- is $report->get_extra_metadata('inspected'), undef, 'report not marked as inspected';
is $report->user->get_extra_metadata('reputation'), $reputation+1, "User reputation was increased";
$mech->submit_form_ok({ button => 'save', with_fields => {
state => 'action scheduled', include_update => undef,
- raise_defect => 1,
} });
- $report->discard_changes;
- is $report->get_extra_metadata('inspected'), 1, 'report marked as inspected';
- $mech->get_ok("/report/$report_id");
- my $meta = $mech->extract_update_metas;
- like $meta->[-1], qr/Updated by .*defect raised/, 'Update mentions defect raised';
};
subtest "Oxfordshire-specific traffic management options are shown" => sub {