X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/12c1d5e6c05813a0697724277b4d8529a1a7c240..9046f9d61a221f9e13e9fc82b74d6b90402114e9:/test/lib/short_link_test.rb diff --git a/test/lib/short_link_test.rb b/test/lib/short_link_test.rb index a0a1023bb..a32e1ac20 100644 --- a/test/lib/short_link_test.rb +++ b/test/lib/short_link_test.rb @@ -20,7 +20,7 @@ class ShortLinkTest < ActiveSupport::TestCase # smaller range. distance = Math.sqrt(((lat - lat2)**2) + ((lon - lon2)**2)) max_distance = 360.0 / (1 << (zoom + 8)) * 0.5 * Math.sqrt(5) - assert max_distance > distance, "Maximum expected error exceeded: #{max_distance} <= #{distance} for (#{lat}, #{lon}, #{zoom})." + assert_operator max_distance, :>, distance, "Maximum expected error exceeded: #{max_distance} <= #{distance} for (#{lat}, #{lon}, #{zoom})." end end