Defect #30455 » 30455-fix-v2.diff
app/models/mail_handler.rb (working copy) | ||
---|---|---|
237 | 237 |
end |
238 | 238 | |
239 | 239 |
# ignore CLI-supplied defaults for new issues |
240 |
handler_options[:issue].clear
|
|
240 |
handler_options[:issue] = {}
|
|
241 | 241 | |
242 | 242 |
journal = issue.init_journal(user) |
243 | 243 |
if from_journal && from_journal.private_notes? |
test/functional/mail_handler_controller_test.rb (working copy) | ||
---|---|---|
60 | 60 |
assert_equal true, issue.is_private |
61 | 61 |
end |
62 | 62 | |
63 |
def test_should_update_issue |
|
64 |
# Enable API and set a key |
|
65 |
Setting.mail_handler_api_enabled = 1 |
|
66 |
Setting.mail_handler_api_key = 'secret' |
|
67 | ||
68 |
assert_no_difference 'Issue.count' do |
|
69 |
assert_difference 'Journal.count' do |
|
70 |
post :index, :params => { |
|
71 |
:key => 'secret', |
|
72 |
:email => IO.read(File.join(FIXTURES_PATH, 'ticket_reply.eml')) |
|
73 |
} |
|
74 |
end |
|
75 |
end |
|
76 |
assert_response 201 |
|
77 |
end |
|
78 | ||
63 | 79 |
def test_should_respond_with_422_if_not_created |
64 | 80 |
Project.find('onlinestore').destroy |
65 | 81 |
- « Previous
- 1
- 2
- Next »