@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/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to