[openstreetmap/openstreetmap-website] Add a page to change legacy trace visibility in bulk (PR #7368)

Ruben L. Mendoza notifications at github.com
Wed Sep 9 13:00:42 UTC 2026


@Rub21 commented on this pull request.



> +
+    def test_edit_date_range_includes_both_ends
+      user = create(:user)
+      trace = create(:trace, :without_validations, :visibility => "public", :user => user, :timestamp => Time.utc(2020, 1, 1, 23, 30))
+
+      session_for(user)
+      get edit_traces_legacy_visibility_path(:from => "2020-01-01", :to => "2020-01-01")
+      assert_response :success
+      assert_select "table#trace_list tbody tr", :count => 1
+      assert_select "table#trace_list tbody tr a", trace.name
+    end
+
+    def test_edit_paged
+      user = create(:user)
+      # one trace more than fits on a single page
+      2.times { create_list(:trace, 10, :without_validations, :visibility => "public", :user => user) }

No difference. I only split it to stay under[`FactoryBot/ExcessiveCreateList`](https://docs.rubocop.org/rubocop-factory_bot/latest/cops_factorybot.html#factorybotexcessivecreatelist), which allows at most 10 per call. I changed it to a single `create_list(:trace, 20, ...)` and added the test file to `.rubocop_todo.yml`, like `traces_controller_test.rb`, so the test can create more than 10 items.

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

Message ID: <openstreetmap/openstreetmap-website/pull/7368/review/5154601197 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260909/7b9c6bf8/attachment-0001.htm>


More information about the rails-dev mailing list