Allow a default version to be set on the command line for incoming emails (#7346).

git-svn-id: http://svn.redmine.org/redmine/trunk@14789 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2015-11-01 08:56:27 +00:00
parent fb8e348254
commit 0df7fa714b
4 changed files with 14 additions and 1 deletions

View File

@@ -129,6 +129,17 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_equal 'Support request', issue.tracker.name
end
def test_add_issue_with_default_version
# This email contains: 'Project: onlinestore'
issue = submit_email(
'ticket_on_given_project.eml',
:issue => {:fixed_version => 'Alpha'}
)
assert issue.is_a?(Issue)
assert !issue.new_record?
assert_equal 'Alpha', issue.reload.fixed_version.name
end
def test_add_issue_with_status_override
# This email contains: 'Project: onlinestore' and 'Status: Resolved'
issue = submit_email('ticket_on_given_project.eml', :allow_override => ['status'])