diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-07-29 16:37:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-07-29 16:37:45 +0000 |
commit | 1502da5726cf0c4053e0f8f96ad65fc5a307584d (patch) | |
tree | d228aff126c41b22de0a480bf8fd485d276e07da /test/unit/mail_handler_test.rb | |
parent | 27c3299f328164f3e1abbece59248f1f68ef0b8c (diff) | |
download | redmine-1502da5726cf0c4053e0f8f96ad65fc5a307584d.tar.gz redmine-1502da5726cf0c4053e0f8f96ad65fc5a307584d.zip |
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
Diffstat (limited to 'test/unit/mail_handler_test.rb')
-rw-r--r-- | test/unit/mail_handler_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 013da992e..3244d8cd2 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -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( |