- ##
- # Test the US postcode search
- def test_search_us_postcode
- with_http_stubs "geocoder_us" do
- xhr :get, :search_us_postcode,
- :query => "90210", :zoom => 10,
- :minlon => -0.559, :minlat => 51.217,
- :maxlon => 0.836, :maxlat => 51.766
- results_check :prefix => "Beverly Hills, CA,", :name => "90210",
- :lat => 34.088808, :lon => -118.40612
-
- xhr :get, :search_us_postcode,
- :query => "00000", :zoom => 10,
- :minlon => -0.559, :minlat => 51.217,
- :maxlon => 0.836, :maxlat => 51.766
- results_check
- end
- end
-
- ##
- # Test the UK postcode search
- def test_search_uk_postcode
- with_http_stubs "npemap" do
- xhr :get, :search_uk_postcode,
- :query => "CV4 7AL", :zoom => 10,
- :minlon => -0.559, :minlat => 51.217,
- :maxlon => 0.836, :maxlat => 51.766
- results_check :name => "CV4 7AL", :lat => 52.381748701968, :lon => -1.56176420939232
-
- xhr :get, :search_uk_postcode,
- :query => "XX9 9XX", :zoom => 10,
- :minlon => -0.559, :minlat => 51.217,
- :maxlon => 0.836, :maxlat => 51.766
- results_check
- end
- end
-