1 # frozen_string_literal: true
5 class ModerationZoneTest < ActiveSupport::TestCase
6 def test_falls_within_any
7 create(:moderation_zone, :seville_cathedral)
10 assert ModerationZone.falls_within_any?(:lat => 37.385972, :lon => -5.993149)
12 # Inside, near the boundary
13 assert ModerationZone.falls_within_any?(:lat => 37.386658, :lon => -5.994024)
15 # Outside, near the boundary
16 assert_not ModerationZone.falls_within_any?(:lat => 37.386769, :lon => -5.994185)