##// END OF EJS Templates
Added "assigned to" field in mail notifications....
Jean-Philippe Lang -
r524:270e3a4345f2
parent child
Show More
@@ -1,7 +1,8
1 1 <%=l(:label_issue)%> #<%= issue.id %> - <%= issue.subject %>
2 2 <%=l(:field_author)%>: <%= issue.author.display_name %>
3 <%=l(:field_assigned_to)%>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %>
3 4 <%=l(:field_status)%>: <%= issue.status.name %>
4 5
5 6 <%= issue.description %>
6 7
7 8 http://<%= Setting.host_name %>/issues/show/<%= issue.id %> No newline at end of file
@@ -1,57 +1,57
1 1 # redMine - project management software
2 2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 require File.dirname(__FILE__) + '/../test_helper'
19 19
20 20 class MailHandlerTest < Test::Unit::TestCase
21 21 fixtures :users, :projects, :roles, :members, :permissions, :issues, :permissions_roles, :trackers, :enumerations
22 22
23 23 FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures'
24 24 CHARSET = "utf-8"
25 25
26 26 include ActionMailer::Quoting
27 27
28 28 def setup
29 29 ActionMailer::Base.delivery_method = :test
30 30 ActionMailer::Base.perform_deliveries = true
31 31 ActionMailer::Base.deliveries = []
32 32
33 33 @expected = TMail::Mail.new
34 34 @expected.set_content_type "text", "plain", { "charset" => CHARSET }
35 35 @expected.mime_version = '1.0'
36 36 end
37 37
38 38 def test_add_note_to_issue
39 raw = read_fixture("add_note_to_issue_2.txt").join
39 raw = read_fixture("add_note_to_issue.txt").join
40 40 MailHandler.receive(raw)
41 41
42 42 issue = Issue.find(2)
43 43 journal = issue.journals.find(:first, :order => "created_on DESC")
44 44 assert journal
45 45 assert_equal User.find_by_mail("jsmith@somenet.foo"), journal.user
46 46 assert_equal "Note added by mail", journal.notes
47 47 end
48 48
49 49 private
50 50 def read_fixture(action)
51 51 IO.readlines("#{FIXTURES_PATH}/mail_handler/#{action}")
52 52 end
53 53
54 54 def encode(subject)
55 55 quoted_printable(subject, CHARSET)
56 56 end
57 57 end
General Comments 0
You need to be logged in to leave comments. Login now