class ReportUserTest < ApplicationSystemTestCase
def test_no_link_when_not_logged_in
note = create(:note_with_comments)
class ReportUserTest < ApplicationSystemTestCase
def test_no_link_when_not_logged_in
note = create(:note_with_comments)
choose I18n.t("reports.new.categories.user.vandal_label")
fill_in "report_details", :with => "This user is a vandal"
choose I18n.t("reports.new.categories.user.vandal_label")
fill_in "report_details", :with => "This user is a vandal"
assert_equal user, Issue.last.reportable
assert_equal "moderator", Issue.last.assigned_role
assert_equal user, Issue.last.reportable
assert_equal "moderator", Issue.last.assigned_role
choose I18n.t("reports.new.categories.user.vandal_label")
fill_in "report_details", :with => "This user is a vandal"
choose I18n.t("reports.new.categories.user.vandal_label")
fill_in "report_details", :with => "This user is a vandal"
assert_equal user, Issue.last.reportable
assert_equal "moderator", Issue.last.assigned_role
assert_equal user, Issue.last.reportable
assert_equal "moderator", Issue.last.assigned_role
choose I18n.t("reports.new.categories.user.spam_label")
fill_in "report_details", :with => "This user is a spammer"
choose I18n.t("reports.new.categories.user.spam_label")
fill_in "report_details", :with => "This user is a spammer"
assert_equal user, Issue.last.reportable
assert_equal "administrator", Issue.last.assigned_role
assert_equal user, Issue.last.reportable
assert_equal "administrator", Issue.last.assigned_role