aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-01-08 14:47:29 +0000
committerMatthew Somerville <matthew@mysociety.org>2020-01-09 17:31:45 +0000
commit65ca47eda62a45bf081128b507c94c7b18a77a00 (patch)
treeee36b2be8b543cab09ecc748a7fad022eb0eb21b /t
parent73a6134c4bb8c29e2755cf7241524dc0538a4a6a (diff)
[TfL] Ignore reports updated over three years ago.
Diffstat (limited to 't')
-rw-r--r--t/cobrand/tfl.t10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/cobrand/tfl.t b/t/cobrand/tfl.t
index 33506e8c4..e1990c946 100644
--- a/t/cobrand/tfl.t
+++ b/t/cobrand/tfl.t
@@ -556,6 +556,16 @@ subtest 'check report age on /around' => sub {
});
};
+subtest 'check report age in general' => sub {
+ my $report = FixMyStreet::DB->resultset("Problem")->find({ title => 'Test Report 1'});
+ $report->update({ state => 'confirmed' });
+ $mech->get_ok('/report/' . $report->id);
+ $report->update({ lastupdate => \"current_timestamp-'4 years'::interval" });
+ $mech->get('/report/' . $report->id);
+ is $mech->res->code, 404;
+ $report->update({ lastupdate => \"current_timestamp" });
+};
+
subtest 'TfL admin allows inspectors to be assigned to borough areas' => sub {
$mech->log_in_ok($superuser->email);