aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 } );