]> git.openstreetmap.org Git - rails.git/blobdiff - test/system/report_user_test.rb
Only include issues visible to the current user in the count
[rails.git] / test / system / report_user_test.rb
index 8bb7d9dd7ed397284faa97ee1952ebecfc0f6c68..8a30c80e05f80585e00d48d194a2a2c25c610609 100644 (file)
@@ -18,13 +18,14 @@ class ReportUserTest < ApplicationSystemTestCase
     assert page.has_content? "Report"
     assert page.has_content? I18n.t("reports.new.disclaimer.intro")
 
-    choose I18n.t("reports.new.categories.user.vandal")
+    choose I18n.t("reports.new.categories.user.vandal_label")
     fill_in "report_details", :with => "This user is a vandal"
-    click_on "Create Report"
+    assert_difference "Issue.count", 1 do
+      click_on "Create Report"
+    end
 
     assert page.has_content? "Your report has been registered sucessfully"
 
-    assert_equal 1, Issue.count
-    assert Issue.last.reportable == user
+    assert_equal user, Issue.last.reportable
   end
 end