summaryrefslogtreecommitdiffstats
path: root/test/unit/journal_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/journal_test.rb')
-rw-r--r--test/unit/journal_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/journal_test.rb b/test/unit/journal_test.rb
index b177f3198..147af4aae 100644
--- a/test/unit/journal_test.rb
+++ b/test/unit/journal_test.rb
@@ -36,4 +36,15 @@ class JournalTest < Test::Unit::TestCase
assert_kind_of IssueStatus, status
assert_equal 2, status.id
end
+
+ def test_create_should_send_email_notification
+ ActionMailer::Base.deliveries.clear
+ issue = Issue.find(:first)
+ user = User.find(:first)
+ journal = issue.init_journal(user, issue)
+
+ assert journal.save
+ assert_equal 1, ActionMailer::Base.deliveries.size
+ end
+
end