[openstreetmap/openstreetmap-website] Restore constraints on note id parameter, simplify tests (PR #4746)

Anton Khorev notifications at github.com
Wed May 1 10:32:14 UTC 2024


Elements, changesets, notes had constraints in their id parameter in routes. https://github.com/openstreetmap/openstreetmap-website/commit/9748ce301c9488b9cd32439448770c3d4a38ebd6 removed this constraint for notes for unknown reason. Without this constraint notes controller needs different tests. The part of "browse_check" that checks negative ids had to be commented out.

This PR restores the constraint which allows to use the same "browse_check" as for every other entity formerly handled by browse controller.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/4746

-- Commit Summary --

  * Restore constraints on note id parameter
  * Use common sidebar_browse_check in notes controller test

-- File Changes --

    M config/routes.rb (2)
    M test/controllers/notes_controller_test.rb (54)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/4746.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4746.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/4746 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240501/9f96ffb8/attachment-0001.htm>


More information about the rails-dev mailing list