"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/unit/mail_handler_test.rb" between
redmine-4.0.3.tar.gz and redmine-4.0.4.tar.gz

About: Redmine is a flexible project management and bug-tracking web application (using the Ruby on Rails framework). It supports also project wikis and forums, documents management, and multiple version control systems.

mail_handler_test.rb  (redmine-4.0.3):mail_handler_test.rb  (redmine-4.0.4)
skipping to change at line 991 skipping to change at line 991
def test_reply_to_a_message_by_subject def test_reply_to_a_message_by_subject
m = submit_email('message_reply_by_subject.eml') m = submit_email('message_reply_by_subject.eml')
assert m.is_a?(Message) assert m.is_a?(Message)
assert !m.new_record? assert !m.new_record?
m.reload m.reload
assert_equal 'Reply to the first post', m.subject assert_equal 'Reply to the first post', m.subject
assert_equal Message.find(1), m.parent assert_equal Message.find(1), m.parent
end 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 def test_should_convert_tags_of_html_only_emails
with_settings :text_formatting => 'textile' do with_settings :text_formatting => 'textile' do
issue = submit_email('ticket_html_only.eml', :issue => {:project => 'ecook book'}) issue = submit_email('ticket_html_only.eml', :issue => {:project => 'ecook book'})
assert issue.is_a?(Issue) assert issue.is_a?(Issue)
assert !issue.new_record? assert !issue.new_record?
issue.reload issue.reload
assert_equal 'HTML email', issue.subject assert_equal 'HTML email', issue.subject
assert_equal "This is a *html-only* email.\r\n\r\nh1. With a title\r\n\r\n and a paragraph.", issue.description assert_equal "This is a *html-only* email.\r\n\r\nh1. With a title\r\n\r\n and a paragraph.", issue.description
end end
end end
skipping to change at line 1125 skipping to change at line 1136
assert_equal 1, issue.reload.attachments.size assert_equal 1, issue.reload.attachments.size
end end
end end
def test_email_with_long_subject_line def test_email_with_long_subject_line
issue = submit_email('ticket_with_long_subject.eml') issue = submit_email('ticket_with_long_subject.eml')
assert issue.is_a?(Issue) assert issue.is_a?(Issue)
assert_equal issue.subject, 'New ticket on a given project with a very long subject line which exceeds 255 chars and should not be ignored but chopped off. And if the subject line is still not long enough, we just add more text. And mor e text. Wow, this is really annoying. Especially, if you have nothing to say...' [0,255] assert_equal issue.subject, 'New ticket on a given project with a very long subject line which exceeds 255 chars and should not be ignored but chopped off. And if the subject line is still not long enough, we just add more text. And mor e text. Wow, this is really annoying. Especially, if you have nothing to say...' [0,255]
end end
def test_email_with_split_bytes_subject
issue = submit_email(
'ticket_with_split_bytes_subject.eml',
:issue => {:project => 'ecookbook'},
:no_permission_check => '1',
:unknown_user => 'accept'
)
assert issue.is_a?(Issue)
assert_equal 'αβγδεζηθικλμνξοπρςστυφχψω', issue.subject
end
def test_first_keyword_should_be_matched def test_first_keyword_should_be_matched
issue = submit_email('ticket_with_duplicate_keyword.eml', :allow_override => 'priority') issue = submit_email('ticket_with_duplicate_keyword.eml', :allow_override => 'priority')
assert issue.is_a?(Issue) assert issue.is_a?(Issue)
assert_equal 'High', issue.priority.name assert_equal 'High', issue.priority.name
end end
def test_keyword_after_delimiter_should_be_ignored def test_keyword_after_delimiter_should_be_ignored
with_settings :mail_handler_body_delimiters => "== DELIMITER ==" do with_settings :mail_handler_body_delimiters => "== DELIMITER ==" do
issue = submit_email('ticket_with_keyword_after_delimiter.eml', :allow_ove rride => 'priority') issue = submit_email('ticket_with_keyword_after_delimiter.eml', :allow_ove rride => 'priority')
assert issue.is_a?(Issue) assert issue.is_a?(Issue)
 End of changes. 2 change blocks. 
0 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)