Defect #35100 ยป 35100-test.patch
| test/unit/mail_handler_test.rb | ||
|---|---|---|
| 1051 | 1051 | end | 
| 1052 | 1052 | end | 
| 1053 | 1053 | |
| 1054 | def test_reply_to_a_issue_without_permission | |
| 1055 | set_tmp_attachments_directory | |
| 1056 |     Role.all.each {|r| r.remove_permission! :add_issue_notes, :edit_issues} | |
| 1057 | assert_no_difference 'Issue.count' do | |
| 1058 | assert_no_difference 'Journal.count' do | |
| 1059 |         assert_not submit_email('ticket_reply_with_status.eml') | |
| 1060 | end | |
| 1061 | end | |
| 1062 | end | |
| 1063 | ||
| 1054 | 1064 | def test_reply_to_a_nonexitent_journal | 
| 1055 | 1065 | journal_id = Issue.find(2).journals.last.id | 
| 1056 | 1066 | Journal.destroy(journal_id) | 
| ... | ... | |
| 1102 | 1112 | end | 
| 1103 | 1113 | end | 
| 1104 | 1114 | |
| 1115 | def test_reply_to_a_topic_without_permission | |
| 1116 |     Role.all.each {|r| r.remove_permission! :add_messages} | |
| 1117 |     assert_no_difference('Message.count') do | |
| 1118 |       assert_not submit_email('message_reply_by_subject.eml') | |
| 1119 | end | |
| 1120 | end | |
| 1121 | ||
| 1105 | 1122 | def test_should_convert_tags_of_html_only_emails | 
| 1106 | 1123 | with_settings :text_formatting => 'textile' do | 
| 1107 | 1124 |       issue = submit_email('ticket_html_only.eml', :issue => {:project => 'ecookbook'}) |