@tomhughes requested changes on this pull request.

Other than the test comment I left, could you squash the fixups down into the 
original commit please - see the tips at 
https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md#pull-requests
 for advice.

> @@ -487,6 +501,20 @@ def check_xml_details(user, include_private, 
> include_email)
     def check_json_details(js, user, include_private, include_email)
       assert_equal user.id, js["user"]["id"]
       assert_equal user.description, js["user"]["description"]
+      assert_equal user.company, js["user"]["company"]
+
+      if user.social_links.present?
+        assert_not_nil js["user"]["social_links"]
+        assert_equal user.social_links.length, 
js["user"]["social_links"].length
+        user.social_links.each_with_index do |link, index|

This is assuming that `user.social_links` here will return the links in the 
same order as when the template was rendered.

Whilst that is very likely to happen there's no guarantee of it as the links 
are not fetched in any particular order so the test should probably just check 
that each expected link exists somewhere in the returned JSON rather than 
expecting the order to match.

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

Message ID: 
<openstreetmap/openstreetmap-website/pull/6452/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to