Skip to content

Commit

Permalink
[Surrey] Fix timed out age test.
Browse files Browse the repository at this point in the history
Report age uses current_timestamp, so fixed time does
not matter, and 1st August is now over 90 days ago.
  • Loading branch information
dracos committed Oct 30, 2024
1 parent 233bbfc commit 61b9ca9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions t/cobrand/surrey.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use FixMyStreet::TestMech;
use FixMyStreet::Script::Reports;
use FixMyStreet::Script::CSVExport;
use Test::MockTime 'set_fixed_time';
use File::Temp 'tempdir';

my $mech = FixMyStreet::TestMech->new;
Expand Down Expand Up @@ -74,7 +73,6 @@ FixMyStreet::override_config {
};

subtest 'Old reports are not shown on Surrey cobrand' => sub {
set_fixed_time('2024-09-20T12:00:00');
note 'A newly created report is shown on Surrey cobrand';
my $json = $mech->get_ok_json('/around?ajax=1&bbox=-0.45869262976076,51.28481314324,-0.42367370886232,51.302390882532');
is_deeply($json->{pins}, [
Expand Down Expand Up @@ -107,7 +105,7 @@ FixMyStreet::override_config {
created => $dt,
confirmed => $dt,
});
$json = $mech->get_ok_json('/around?ajax=1&bbox=-0.45869262976076,51.28481314324,-0.42367370886232,51.302390882532');
$json = $mech->get_ok_json('/around?ajax=1&show_old_reports=1&bbox=-0.45869262976076,51.28481314324,-0.42367370886232,51.302390882532');
is_deeply($json->{pins}, [
[ "51.293415", "-0.441269", "yellow", $report->id, $report->title, "", 'false' ],
], 'Open311 report is initially in Surrey cobrand');
Expand Down

0 comments on commit 61b9ca9

Please sign in to comment.