diff options
author | Go MAEDA <maeda@farend.jp> | 2021-04-22 03:46:35 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-04-22 03:46:35 +0000 |
commit | 79a6a77c5b8c51484f5dd86e583159b1cd4ae783 (patch) | |
tree | 52beb4f43f63980073f8d522352a7b9e9c380b99 /test | |
parent | d22c389ba23f6e906fdd98867cf2d555e4ea2ba5 (diff) | |
download | redmine-79a6a77c5b8c51484f5dd86e583159b1cd4ae783.tar.gz redmine-79a6a77c5b8c51484f5dd86e583159b1cd4ae783.zip |
Merged r20959 from trunk to 4.1-stable (#35100).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@20961 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/mail_handler_test.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 524b37072..3c749b329 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -1005,6 +1005,16 @@ class MailHandlerTest < ActiveSupport::TestCase end end + def test_reply_to_a_issue_without_permission + set_tmp_attachments_directory + Role.all.each {|r| r.remove_permission! :add_issue_notes, :edit_issues} + assert_no_difference 'Issue.count' do + assert_no_difference 'Journal.count' do + assert_not submit_email('ticket_reply_with_status.eml') + end + end + end + def test_reply_to_a_nonexitent_journal journal_id = Issue.find(2).journals.last.id Journal.destroy(journal_id) @@ -1056,6 +1066,13 @@ class MailHandlerTest < ActiveSupport::TestCase end end + def test_reply_to_a_topic_without_permission + Role.all.each {|r| r.remove_permission! :add_messages} + assert_no_difference('Message.count') do + assert_not submit_email('message_reply_by_subject.eml') + end + end + def test_should_convert_tags_of_html_only_emails with_settings :text_formatting => 'textile' do issue = submit_email('ticket_html_only.eml', :issue => {:project => 'ecookbook'}) |