mirror of
https://github.com/redmine/redmine.git
synced 2026-07-01 02:08:21 +02:00
Adds private issue option to receiving emails (#8424).
git-svn-id: http://svn.redmine.org/redmine/trunk@14262 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -38,6 +38,21 @@ class MailHandlerControllerTest < ActionController::TestCase
|
||||
assert_response 201
|
||||
end
|
||||
|
||||
def test_should_create_issue_with_options
|
||||
# Enable API and set a key
|
||||
Setting.mail_handler_api_enabled = 1
|
||||
Setting.mail_handler_api_key = 'secret'
|
||||
|
||||
assert_difference 'Issue.count' do
|
||||
post :index, :key => 'secret',
|
||||
:email => IO.read(File.join(FIXTURES_PATH, 'ticket_on_given_project.eml')),
|
||||
:issue => {:is_private => '1'}
|
||||
end
|
||||
assert_response 201
|
||||
issue = Issue.order(:id => :desc).first
|
||||
assert_equal true, issue.is_private
|
||||
end
|
||||
|
||||
def test_should_respond_with_422_if_not_created
|
||||
Project.find('onlinestore').destroy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user