aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-05-02 10:33:36 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-05-02 16:05:17 +0100
commit1f83e1aec0128a2cc52d220e5eae2c2b2fad5122 (patch)
treedfb84334cdc163d95e0112ff19ab39739b81bfbc /t/cobrand
parent6e739457cb294f7c99ce0a5b1132292c8fc352ac (diff)
Tidy up find_closest* functions.
Allow find_closest to be called multiple times with only one lookup, and to return just its data, not a compiled string.
Diffstat (limited to 't/cobrand')
-rw-r--r--t/cobrand/closest.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/cobrand/closest.t b/t/cobrand/closest.t
index 43b36f608..0d6a772ba 100644
--- a/t/cobrand/closest.t
+++ b/t/cobrand/closest.t
@@ -59,7 +59,7 @@ $report->geocode( undef );
ok !$report->geocode, 'no geocode entry for report';
-my $near = $c->find_closest( $report->latitude, $report->longitude, $report );
+my $near = $c->find_closest($report);
SKIP: {
if (!FixMyStreet->config('BING_MAPS_API_KEY')) {
@@ -72,13 +72,13 @@ SKIP: {
like $near, qr/Constitution Hill/i, 'nearest street looks right';
like $near, qr/Nearest postcode .*: SW1A 1AA/i, 'nearest postcode looks right';
- $near = $c->find_closest_address_for_rss( $report->latitude, $report->longitude, $report );
+ $near = $c->find_closest_address_for_rss($report);
like $near, qr/Constitution Hill/i, 'nearest street for RSS looks right';
unlike $near, qr/Nearest postcode/i, 'no nearest postcode in RSS text';
$report->geocode( undef );
- $near = $c->find_closest_address_for_rss( $report->latitude, $report->longitude, $report );
+ $near = $c->find_closest_address_for_rss($report);
ok !$near, 'no closest address for RSS if not cached';
}