[openstreetmap/openstreetmap-website] Avoid testing against empty db queries (#2725)
Tom Hughes
notifications at github.com
Wed Jul 22 15:48:42 UTC 2020
@tomhughes requested changes on this pull request.
> @@ -131,7 +145,7 @@ def test_index_user_not_found
def test_index_friends
private_user = create(:user, :data_public => true)
friendship = create(:friendship, :befriender => private_user)
- create(:changeset, :user => friendship.befriendee)
+ changeset = create(:changeset, :user => friendship.befriendee, :num_changes => 1)
Shouldn't this create some "other" changesets to make sure we only get the expected one?
> end
##
# Checks the display of the nearby user changesets listing
def test_index_nearby
private_user = create(:user, :data_public => false, :home_lat => 51.1, :home_lon => 1.0)
user = create(:user, :home_lat => 51.0, :home_lon => 1.0)
- create(:changeset, :user => user)
+ changeset = create(:changeset, :user => user, :num_changes => 1)
Same here?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2725#pullrequestreview-453449892
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200722/36d8be83/attachment.htm>
More information about the rails-dev
mailing list