[openstreetmap/openstreetmap-website] Rework UI to hide/delete/suspend users (PR #6564)

Pablo Brasero notifications at github.com
Mon Dec 8 11:39:30 UTC 2025


@pablobm commented on this pull request.



> @@ -476,8 +476,11 @@ def test_index_paged
 
   def test_index_user_paged
     user = create(:user)
-    create_list(:diary_entry, 50, :user => user)
-    user.confirm!
+    num_entries = 50
+    build_list(:diary_entry, num_entries, :user => user) do |entry, i|
+      entry.created_at = (num_entries - i).days.ago
+      entry.save!
+    end

Hm, there's a reason, but on second thought it was a bad idea.

This is here because the test was failing once we allowed transitioning from `confirmed` to `suspended`. I didn't think it through and filed it under "issue with the test", but instead the test is showing why this can be a problem.

I'll elaborate on the main thread so that it's more visible for future readers.

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

Message ID: <openstreetmap/openstreetmap-website/pull/6564/review/3551590879 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251208/02fd2d1d/attachment.htm>


More information about the rails-dev mailing list