aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-04-25 15:59:53 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-04-25 15:59:53 +0100
commitea80da0bc3e3154614b139a0aacc5e15654a1e72 (patch)
tree9395fcd089318a66257f89230b48a759b6d079fe
parent9876c8baa9ac72ba71a3bf04ef29307b70b2c128 (diff)
Sign up inspector, not creator, on inspection.
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm2
-rw-r--r--t/app/controller/report_inspect.t4
2 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 1646bc4d5..e36085d05 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -426,7 +426,7 @@ sub inspect : Private {
cobrand_data => $problem->cobrand_data,
lang => $problem->lang,
};
- $problem->user->create_alert($problem->id, $options);
+ $c->user->create_alert($problem->id, $options);
}
# If the state has been changed to action scheduled and they've said
diff --git a/t/app/controller/report_inspect.t b/t/app/controller/report_inspect.t
index f2b300e11..6a001225d 100644
--- a/t/app/controller/report_inspect.t
+++ b/t/app/controller/report_inspect.t
@@ -36,8 +36,8 @@ my $report_id = $report->id;
my $report2_id = $report2->id;
my $report3_id = $report3->id;
-
-my $user = $mech->log_in_ok('test@example.com');
+$mech->create_user_ok('body@example.com', name => 'Body User');
+my $user = $mech->log_in_ok('body@example.com');
$user->set_extra_metadata('categories', [ $contact->id ]);
$user->update( { from_body => $oxon } );