diff options
author | Marius Halden <marius.h@lden.org> | 2018-06-07 13:28:45 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2018-06-07 13:28:45 +0200 |
commit | 956f8b8a065824f9a9dc379eba1d0aa8b1b669cf (patch) | |
tree | 49f9ccb147b18dddee97500d4df7a3fb3dd3737c /t/cobrand/closest.t | |
parent | 782457d016084c8de04989dbc824a71899f8b41b (diff) | |
parent | 4dbf5371f79c5f290c08e561ba2c881e96b58669 (diff) |
Merge tag 'v2.3.3' into fiksgatami-dev
Diffstat (limited to 't/cobrand/closest.t')
-rw-r--r-- | t/cobrand/closest.t | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/t/cobrand/closest.t b/t/cobrand/closest.t index 36fe78a01..6d28bb6f1 100644 --- a/t/cobrand/closest.t +++ b/t/cobrand/closest.t @@ -72,8 +72,18 @@ FixMyStreet::override_config { $near = $c->find_closest_address_for_rss($report); ok !$near, 'no closest address for RSS if not cached'; + + my $json = $mech->get_ok_json('/ajax/closest?lat=55&lon=-1'); + is_deeply $json, {"road"=> "Constitution Hill","full_address"=>"Constitution Hill, London, SW1A"}; +}; + +FixMyStreet::override_config { + ALLOWED_COBRANDS => 'fixmystreet', + MAPIT_URL => 'http://mapit.uk/', + BING_MAPS_API_KEY => 'test', +}, sub { + my $json = $mech->get_ok_json('/ajax/closest?lat=55.952055&lon=-3.189579'); + is_deeply $json, {"road"=> "Constitution Hill","full_address"=>"Constitution Hill, London, SW1A"}; }; -END { - done_testing(); -} +done_testing(); |