[openstreetmap/openstreetmap-website] Fix verification redirect on missing report category (PR #3542)

Harry Wood notifications at github.com
Wed May 4 18:52:21 UTC 2022


@harry-wood commented on this pull request.



> @@ -63,10 +63,12 @@ def test_new_report_with_incomplete_details
       category = "other"
       post reports_path(:report => {
                           :category => category,
-                          :issue => { :reportable_id => 1, :reportable_type => "User" }
+                          :issue => { :reportable_id => target_user.id, :reportable_type => "User" }

For some reason swapping to `render` instead of redirect causes our test user to get created (or _more often_ get created) with some id other than 1
but anyway it should probably have always been `target_user.id` to make it less brittle. 

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

Message ID: <openstreetmap/openstreetmap-website/pull/3542/review/962331720 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220504/62a9bebe/attachment.htm>


More information about the rails-dev mailing list