test/calculations_test.rb in geocoder-1.1.3 vs test/calculations_test.rb in geocoder-1.1.4
- old
+ new
@@ -183,6 +183,13 @@
assert Geocoder::Calculations.coordinates_present?(3.23)
assert !Geocoder::Calculations.coordinates_present?(nil)
assert !Geocoder::Calculations.coordinates_present?(Geocoder::Calculations::NAN)
assert !Geocoder::Calculations.coordinates_present?(3.23, nil)
end
+
+ def test_extract_coordinates
+ coords = [-23,47]
+ l = Landmark.new("Madagascar", coords[0], coords[1])
+ assert_equal coords, Geocoder::Calculations.extract_coordinates(l)
+ assert_equal coords, Geocoder::Calculations.extract_coordinates(coords)
+ end
end