[openstreetmap/openstreetmap-website] Introduce relation member limit (PR #3440)

Tom Hughes notifications at github.com
Wed Feb 2 11:43:40 UTC 2022


@tomhughes requested changes on this pull request.



> @@ -230,4 +230,24 @@ def test_changeset_bbox_delete_relation
     assert_equal 39, changeset.min_lat
     assert_equal 116, changeset.max_lat
   end
+
+  # Check that the preconditions fail when you are over the defined limit of
+  # the maximum number of members in a relation.
+  def test_max_members_per_relation_limit
+    # Speed up unit test by using a small relation member limit
+    Settings.max_number_of_relation_members = 20

This should probably be reset to the original value after the test - it's probably not an issue here but changing global state in a test needs to be done carefully in case it affects later tests.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3440#pullrequestreview-870423508
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3440/review/870423508 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220202/a91ef084/attachment.htm>


More information about the rails-dev mailing list