mirror of
https://github.com/redmine/redmine.git
synced 2025-11-13 16:56:00 +01:00
Adding an issue note via email fails due to NoMethodError (#30455).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@17817 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -237,7 +237,7 @@ class MailHandler < ActionMailer::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
# ignore CLI-supplied defaults for new issues
|
# ignore CLI-supplied defaults for new issues
|
||||||
handler_options[:issue].clear
|
handler_options[:issue] = {}
|
||||||
|
|
||||||
journal = issue.init_journal(user)
|
journal = issue.init_journal(user)
|
||||||
if from_journal && from_journal.private_notes?
|
if from_journal && from_journal.private_notes?
|
||||||
|
|||||||
@@ -60,6 +60,22 @@ class MailHandlerControllerTest < Redmine::ControllerTest
|
|||||||
assert_equal true, issue.is_private
|
assert_equal true, issue.is_private
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_should_update_issue
|
||||||
|
# Enable API and set a key
|
||||||
|
Setting.mail_handler_api_enabled = 1
|
||||||
|
Setting.mail_handler_api_key = 'secret'
|
||||||
|
|
||||||
|
assert_no_difference 'Issue.count' do
|
||||||
|
assert_difference 'Journal.count' do
|
||||||
|
post :index, :params => {
|
||||||
|
:key => 'secret',
|
||||||
|
:email => IO.read(File.join(FIXTURES_PATH, 'ticket_reply.eml'))
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
assert_response 201
|
||||||
|
end
|
||||||
|
|
||||||
def test_should_respond_with_422_if_not_created
|
def test_should_respond_with_422_if_not_created
|
||||||
Project.find('onlinestore').destroy
|
Project.find('onlinestore').destroy
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user