diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-02-20 14:07:48 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-02-25 12:19:50 +0000 |
commit | 66f2160d3718f049a3772f2f69f623971295f547 (patch) | |
tree | bdda43140ab0ce632a0cba4d4d603cc7cfecb0c8 /t | |
parent | 775ce06cb346cf2d00171e7cdbe0cf1817002f14 (diff) |
Refactor nearby() to use named parameters not list
Diffstat (limited to 't')
-rw-r--r-- | t/cobrand/restriction.t | 2 | ||||
-rw-r--r-- | t/map/tilma/original.t | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/t/cobrand/restriction.t b/t/cobrand/restriction.t index 9e3018625..63fe326b1 100644 --- a/t/cobrand/restriction.t +++ b/t/cobrand/restriction.t @@ -47,7 +47,7 @@ is($c->model('DB::Problem')->count, 4, 'Four reports in database'); is($cobrand->problems->count, 2, 'Two reports in the right cobrand'); is($cobrand->updates->count, 1, 'One update in the right cobrand'); -my $nearby = $c->model('DB::Nearby')->nearby($c, 5, [], 10, 0.003, 0.004); +my $nearby = $c->model('DB::Nearby')->nearby($c, distance => 5, ids => [], limit => 10, latitude => 0.003, longitude => 0.004); is(@$nearby, 1, 'One report close to the origin point'); done_testing(); diff --git a/t/map/tilma/original.t b/t/map/tilma/original.t index 42cbbd9f2..9a404a2c9 100644 --- a/t/map/tilma/original.t +++ b/t/map/tilma/original.t @@ -93,12 +93,10 @@ for my $test ( $report->update; $c->stash->{report_age_field} = 'lastupdate'; - my ( $on_map, $nearby, $dist ) = - FixMyStreet::Map::map_features($c, bbox => "0,0,0,0"); + my ($on_map, $nearby) = FixMyStreet::Map::map_features($c, bbox => "0,0,0,0"); ok $on_map; ok $nearby; - ok $dist; my $id = $report->id; my $colour = $test->{colour}; |