##// END OF EJS Templates
remove trailing white-spaces and an empty line from unit journal observer test....
Toshi MARUYAMA -
r5687:435e9b326c26
parent child
Show More
@@ -5,12 +5,12
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -35,14 +35,14 class JournalObserverTest < ActiveSupport::TestCase
35 assert journal.save
35 assert journal.save
36 assert_equal 1, ActionMailer::Base.deliveries.size
36 assert_equal 1, ActionMailer::Base.deliveries.size
37 end
37 end
38
38
39 def test_create_should_not_send_email_notification_with_notify_set_to_false
39 def test_create_should_not_send_email_notification_with_notify_set_to_false
40 Setting.notified_events = ['issue_updated']
40 Setting.notified_events = ['issue_updated']
41 issue = Issue.find(:first)
41 issue = Issue.find(:first)
42 user = User.find(:first)
42 user = User.find(:first)
43 journal = issue.init_journal(user, issue)
43 journal = issue.init_journal(user, issue)
44 journal.notify = false
44 journal.notify = false
45
45
46 assert journal.save
46 assert journal.save
47 assert_equal 0, ActionMailer::Base.deliveries.size
47 assert_equal 0, ActionMailer::Base.deliveries.size
48 end
48 end
@@ -75,7 +75,7 class JournalObserverTest < ActiveSupport::TestCase
75 user = User.find(:first)
75 user = User.find(:first)
76 journal = issue.init_journal(user, issue)
76 journal = issue.init_journal(user, issue)
77 journal.notes = 'This update has a note'
77 journal.notes = 'This update has a note'
78
78
79 assert journal.save
79 assert journal.save
80 assert_equal 0, ActionMailer::Base.deliveries.size
80 assert_equal 0, ActionMailer::Base.deliveries.size
81 end
81 end
@@ -98,7 +98,7 class JournalObserverTest < ActiveSupport::TestCase
98 user = User.find(:first)
98 user = User.find(:first)
99 issue.init_journal(user, issue)
99 issue.init_journal(user, issue)
100 issue.status = IssueStatus.last
100 issue.status = IssueStatus.last
101
101
102 assert issue.save
102 assert issue.save
103 assert_equal 0, ActionMailer::Base.deliveries.size
103 assert_equal 0, ActionMailer::Base.deliveries.size
104 end
104 end
@@ -121,9 +121,8 class JournalObserverTest < ActiveSupport::TestCase
121 user = User.find(:first)
121 user = User.find(:first)
122 issue.init_journal(user, issue)
122 issue.init_journal(user, issue)
123 issue.priority = IssuePriority.last
123 issue.priority = IssuePriority.last
124
124
125 assert issue.save
125 assert issue.save
126 assert_equal 0, ActionMailer::Base.deliveries.size
126 assert_equal 0, ActionMailer::Base.deliveries.size
127 end
127 end
128
129 end
128 end
General Comments 0
You need to be logged in to leave comments. Login now