[openstreetmap/openstreetmap-website] Move changeset show action to changesets controller (PR #4552)
Anton Khorev
notifications at github.com
Fri Mar 1 07:09:50 UTC 2024
@AntonKhorev commented on this pull request.
> @@ -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
This test was comparing empty list of changesets (because changesets without changes are filtered out) with another empty list of changesets (because `user.changesets` weren't updated after `create(:changeset, ...)`). So it wasn't testing anything and it wasn't testing my changes.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4552#discussion_r1508561352
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4552/review/1910442774 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240229/7f9dec71/attachment.htm>
More information about the rails-dev
mailing list