Added a test for the mail handler.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@524 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-05-09 19:24:07 +00:00
parent 42193960f2
commit cff3950e6b
3 changed files with 74 additions and 3 deletions
+3 -3
View File
@@ -18,7 +18,7 @@
class MailHandler < ActionMailer::Base
# Processes incoming emails
# Currently, it only supports adding notes to an existing issue
# Currently, it only supports adding a note to an existing issue
# by replying to the initial notification message
def receive(email)
# find related issue by parsing the subject
@@ -33,8 +33,8 @@ class MailHandler < ActionMailer::Base
# check permission
return unless Permission.allowed_to_role("issues/add_note", user.role_for_project(issue.project))
# add the notes
issue.init_journal(user, email.body)
# add the note
issue.init_journal(user, email.body.chomp)
issue.save
end
end