Ability to assign issues to groups (#2964).
Option is disabled by default. It can be turned on in application settings. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6306 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -109,6 +109,18 @@ class MailHandlerTest < ActiveSupport::TestCase
|
||||
assert_equal 'Urgent', issue.priority.to_s
|
||||
assert issue.description.include?('Lorem ipsum dolor sit amet, consectetuer adipiscing elit.')
|
||||
end
|
||||
|
||||
def test_add_issue_with_group_assignment
|
||||
with_settings :issue_group_assignment => '1' do
|
||||
issue = submit_email('ticket_on_given_project.eml') do |email|
|
||||
email.gsub!('Assigned to: John Smith', 'Assigned to: B Team')
|
||||
end
|
||||
assert issue.is_a?(Issue)
|
||||
assert !issue.new_record?
|
||||
issue.reload
|
||||
assert_equal Group.find(11), issue.assigned_to
|
||||
end
|
||||
end
|
||||
|
||||
def test_add_issue_with_partial_attributes_override
|
||||
issue = submit_email('ticket_with_attributes.eml', :issue => {:priority => 'High'}, :allow_override => ['tracker'])
|
||||
@@ -446,6 +458,7 @@ class MailHandlerTest < ActiveSupport::TestCase
|
||||
|
||||
def submit_email(filename, options={})
|
||||
raw = IO.read(File.join(FIXTURES_PATH, filename))
|
||||
yield raw if block_given?
|
||||
MailHandler.receive(raw, options)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user