Skip to content
Snippets Groups Projects
Commit 56a3bf17 authored by Alex Reisner's avatar Alex Reisner
Browse files

Merge pull request #231 from davekrupinski/master

Enable ShowPostal for GeocoderCA Lookup
parents 0ead6f9f 4899fb70
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ module Geocoder::Lookup ...@@ -33,6 +33,7 @@ module Geocoder::Lookup
params[:reverse] = 1 params[:reverse] = 1
else else
params[:locate] = query params[:locate] = query
params[:showpostal] = 1
end end
"http://geocoder.ca/?" + hash_to_query(params) "http://geocoder.ca/?" + hash_to_query(params)
end end
......
...@@ -27,4 +27,11 @@ class LookupTest < Test::Unit::TestCase ...@@ -27,4 +27,11 @@ class LookupTest < Test::Unit::TestCase
g = Geocoder::Lookup::Yahoo.new g = Geocoder::Lookup::Yahoo.new
assert_match "appid=MY_KEY", g.send(:query_url, "Madison Square Garden, New York, NY 10001, United States") assert_match "appid=MY_KEY", g.send(:query_url, "Madison Square Garden, New York, NY 10001, United States")
end end
def test_geocoder_ca_showpostal
Geocoder::Configuration.api_key = "MY_KEY"
g = Geocoder::Lookup::GeocoderCa.new
assert_match "showpostal=1", g.send(:query_url, "Madison Square Garden, New York, NY 10001, United States")
end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment