Actualiza a Redmine 3.4.13
This commit is contained in:
parent
807ff3308d
commit
ecddcaf1d3
224 changed files with 2222 additions and 1000 deletions
|
@ -866,6 +866,21 @@ class MailHandlerTest < ActiveSupport::TestCase
|
|||
assert_equal 'Paella.jpg', detail.value
|
||||
end
|
||||
|
||||
def test_update_issue_should_discard_all_changes_on_validation_failure
|
||||
Issue.any_instance.stubs(:valid?).returns(false)
|
||||
assert_no_difference 'Journal.count' do
|
||||
assert_no_difference 'JournalDetail.count' do
|
||||
assert_no_difference 'Attachment.count' do
|
||||
assert_no_difference 'Issue.count' do
|
||||
journal = submit_email('ticket_with_attachment.eml') do |raw|
|
||||
raw.gsub! /^Subject: .*$/, 'Subject: Re: [Cookbook - Feature #2] (New) Add ingredients categories'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_update_issue_should_send_email_notification
|
||||
journal = submit_email('ticket_reply.eml')
|
||||
assert journal.is_a?(Journal)
|
||||
|
@ -940,6 +955,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'})
|
||||
|
@ -1128,12 +1154,13 @@ class MailHandlerTest < ActiveSupport::TestCase
|
|||
options = MailHandler.extract_options_from_env({
|
||||
'tracker' => 'defect',
|
||||
'project' => 'foo',
|
||||
'unknown_user' => 'create'
|
||||
'unknown_user' => 'create',
|
||||
'no_notification' => '1'
|
||||
})
|
||||
|
||||
assert_equal({
|
||||
:issue => {:tracker => 'defect', :project => 'foo'},
|
||||
:unknown_user => 'create'
|
||||
:unknown_user => 'create', :no_notification => '1'
|
||||
}, options)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue