3 class IssueTest < ActiveSupport::TestCase
5 note = create(:note_comment, :author => create(:user)).note
7 create(:language, :code => "en")
8 diary_entry = create(:diary_entry)
11 issue.reportable = user
13 assert_equal issue.reported_user, user
15 # FIXME: doesn't handle anonymous notes
16 issue.reportable = note
18 assert_equal issue.reported_user, note.author
20 issue.reportable = diary_entry
22 assert_equal issue.reported_user, diary_entry.user