[openstreetmap/openstreetmap-website] Move changeset show action to changesets controller (PR #4552)
Tom Hughes
notifications at github.com
Thu Feb 29 17:11:00 UTC 2024
@tomhughes commented on this pull request.
Nice work, just a few small queries...
> @@ -147,7 +147,7 @@ def test_permalink
get permalink_path(:code => "wBz3--", :changeset => 4)
assert_response :redirect
- assert_redirected_to :controller => :browse, :action => :changeset, :id => 4, :anchor => "map=3/4.8779296875/3.955078125"
+ assert_redirected_to :controller => :changesets, :action => :show, :id => 4, :anchor => "map=3/4.8779296875/3.955078125"
This can use `changeset_path` now I think?
> @@ -121,8 +125,9 @@ def test_index_bbox
# Checks the display of the user changesets listing
def test_index_user
user = create(:user)
- create(:changeset, :user => user)
- create(:changeset, :closed, :user => user)
+ create(:changeset, :user => user, :num_changes => 1)
+ create(:changeset, :closed, :user => user, :num_changes => 1)
Why does this need changes when neither the `index` action or the rest of this test has changed?
> @@ -121,8 +125,9 @@ def test_index_bbox
# Checks the display of the user changesets listing
def test_index_user
user = create(:user)
- create(:changeset, :user => user)
- create(:changeset, :closed, :user => user)
+ create(:changeset, :user => user, :num_changes => 1)
+ create(:changeset, :closed, :user => user, :num_changes => 1)
+ user.reload
Why do we need to reload the user? Is that to cause the cached changeset count on the user to update or something?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4552#pullrequestreview-1909432428
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4552/review/1909432428 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240229/6118f5a9/attachment.htm>
More information about the rails-dev
mailing list