]> git.openstreetmap.org Git - rails.git/blobdiff - test/system/report_user_test.rb
Just pass the object, rather than the id, to _path methods where possible
[rails.git] / test / system / report_user_test.rb
index 3dfbf4f1f47947bfe7a54e479faadc091d4cba01..9d919523b5bbba4fd4495f9321cd591e016c65d3 100644 (file)
@@ -12,7 +12,7 @@ class ReportUserTest < ApplicationSystemTestCase
   def test_can_report_user
     user = create(:user)
     sign_in_as(create(:user))
-    visit user_path(user.display_name)
+    visit user_path(user)
 
     click_on I18n.t("user.show.report")
     assert page.has_content? "Report"
@@ -33,7 +33,7 @@ class ReportUserTest < ApplicationSystemTestCase
   def test_it_promotes_issues
     user = create(:user)
     sign_in_as(create(:user))
-    visit user_path(user.display_name)
+    visit user_path(user)
 
     click_on I18n.t("user.show.report")
     assert page.has_content? "Report"
@@ -50,7 +50,7 @@ class ReportUserTest < ApplicationSystemTestCase
     assert_equal user, Issue.last.reportable
     assert_equal "moderator", Issue.last.assigned_role
 
-    visit user_path(user.display_name)
+    visit user_path(user)
 
     click_on I18n.t("user.show.report")
     assert page.has_content? "Report"