[openstreetmap/openstreetmap-website] Use `assert_content` instead of `assert page.has_content?` (PR #3411)

Andy Allan notifications at github.com
Thu Jan 6 15:05:35 UTC 2022


@gravitystorm commented on this pull request.



> @@ -113,7 +113,7 @@ def test_issue_index_with_multiple_roles
 
     visit issues_path
 
-    assert page.has_link?(I18n.t("issues.index.reports_count", :count => issue1.reports_count), :href => issue_path(issue1))
-    assert page.has_link?(I18n.t("issues.index.reports_count", :count => issue2.reports_count), :href => issue_path(issue2))
+    assert_link I18n.t("issues.index.reports_count", :count => issue1.reports_count), :href => issue_path(issue2)

Great catch! That was a mistake caused by me messing around trying to get the friendly error message to show up. I've force-pushed the corrected version.

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

Message ID: <openstreetmap/openstreetmap-website/pull/3411/review/845719868 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220106/65f76dc5/attachment.htm>


More information about the rails-dev mailing list