Use the default project when receiving an email with an invalid project keyword (#14491).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12067 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-07-29 16:37:45 +00:00
parent 27c3299f32
commit 1502da5726
2 changed files with 17 additions and 0 deletions
+9
View File
@@ -370,6 +370,15 @@ class MailHandlerTest < ActiveSupport::TestCase
assert issue.description.include?('Lorem ipsum dolor sit amet, consectetuer adipiscing elit.')
end
def test_add_issue_with_invalid_project_should_be_assigned_to_default_project
issue = submit_email('ticket_on_given_project.eml', :issue => {:project => 'ecookbook'}, :allow_override => 'project') do |email|
email.gsub!(/^Project:.+$/, 'Project: invalid')
end
assert issue.is_a?(Issue)
assert !issue.new_record?
assert_equal 'ecookbook', issue.project.identifier
end
def test_add_issue_with_localized_attributes
User.find_by_mail('jsmith@somenet.foo').update_attribute 'language', 'fr'
issue = submit_email(