X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/50f658142be71156945d5ab3a73ae3851365768b..abea45aa56c3360d7f309b9517cb7a7e3af99cc5:/test/lib/short_link_test.rb?ds=sidebyside 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