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

Add test for nautical miles distance calculation.

parent 7ea45857
Branches
Tags
No related merge requests found
......@@ -38,6 +38,12 @@ class CalculationsTest < Test::Unit::TestCase
assert (la_to_ny - 3942).abs < 10
end
def test_distance_between_in_nautical_miles
assert_equal 60, Geocoder::Calculations.distance_between([0,0], [0,1], :units => :nm).round
la_to_ny = Geocoder::Calculations.distance_between([34.05,-118.25], [40.72,-74], :units => :nm).round
assert (la_to_ny - 2124).abs < 10
end
# --- geographic center ---
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment