aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-10-06 14:07:53 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-10-11 16:17:32 +0100
commite1038dac8f5ba0fe2f20781468b3cbe763b7ed68 (patch)
tree92bac1075a1de16b80cc411b0add8b2aa11f38f6 /t/app
parent9fc69a31cda118948e3714bc7f4fff9d0a3ca84e (diff)
Fix bug in fetching existing shortlisted report.
It would always create a new report rather than return an existing one, if present.
Diffstat (limited to 't/app')
-rw-r--r--t/app/model/user_planned_report.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/app/model/user_planned_report.t b/t/app/model/user_planned_report.t
index 6c0823044..a9c2ee9b5 100644
--- a/t/app/model/user_planned_report.t
+++ b/t/app/model/user_planned_report.t
@@ -19,6 +19,10 @@ $user->add_to_planned_reports($problem);
is $user->active_planned_reports, 1;
is $user->planned_reports, 1;
+$user->add_to_planned_reports($problem);
+is $user->active_planned_reports, 1;
+is $user->planned_reports, 1;
+
$user->remove_from_planned_reports($problem);
is $user->active_planned_reports, 0;
is $user->planned_reports, 1;