diff options
author | Go MAEDA <maeda@farend.jp> | 2019-06-10 00:54:28 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-06-10 00:54:28 +0000 |
commit | 7bb8ab5e24aee7f32d762c9adf4318c1a902d8e8 (patch) | |
tree | c471effa59960b3d282c91f3bd4faf0fa7ff9428 /test/unit/mail_handler_test.rb | |
parent | 37b7578f0f5601ae7ef0ded29b12422ad00e9152 (diff) | |
download | redmine-7bb8ab5e24aee7f32d762c9adf4318c1a902d8e8.tar.gz redmine-7bb8ab5e24aee7f32d762c9adf4318c1a902d8e8.zip |
Fix "Undefined local variable sender_email" error in MailHandler#receive_message_reply when receiving a reply to a locked topic (#31503).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@18239 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mail_handler_test.rb')
-rw-r--r-- | test/unit/mail_handler_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 447b2c5c2..469722a37 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -1002,6 +1002,17 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal Message.find(1), m.parent end + def test_reply_to_a_locked_topic + # Lock the topic + topic = Message.find(2).parent + topic.update_attribute :locked, true + + assert_no_difference('topic.replies_count') do + m = submit_email('message_reply_by_subject.eml') + assert_not_kind_of Message, m + 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'}) |