[openstreetmap/openstreetmap-website] Use `where()` instead of `find()` to prevent RecordNotFound (PR #4203)

Tom Hughes notifications at github.com
Sat Aug 26 09:47:13 UTC 2023


@tomhughes commented on this pull request.



> @@ -419,13 +419,15 @@ def test_index
       check_json_details(js["users"][1], user3, false, false)
 
       get api_users_path, :params => { :users => create(:user, :suspended).id }
-      assert_response :not_found
+      assert_response :success

You should add the same assertion here that you use later to check that no users are returned.

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

Message ID: <openstreetmap/openstreetmap-website/pull/4203/review/1596828958 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230826/67f9d7d7/attachment-0001.htm>


More information about the rails-dev mailing list