test/unit/graticule/geocoder/google_test.rb in graticule-0.2.2 vs test/unit/graticule/geocoder/google_test.rb in graticule-0.2.3
- old
+ new
@@ -22,9 +22,23 @@
:latitude => 37.423021,
:precision => :address
)
assert_equal location, @geocoder.locate('1600 Amphitheatre Parkway, Mountain View, CA')
end
+
+ def test_partial
+ return unless prepare_response(:partial)
+
+ location = Location.new(
+ :locality => "San Francisco",
+ :region => "CA",
+ :country => "US",
+ :longitude => -122.418333,
+ :latitude => 37.775000
+ )
+
+ assert_equal location, @geocoder.locate('sf ca')
+ end
def test_bad_key
return unless prepare_response(:badkey)
assert_raises(CredentialsError) { @geocoder.locate('x') }
end
\ No newline at end of file