@@ -544,7 +544,7 class IssueTest < ActiveSupport::TestCase | |||
|
544 | 544 | assert issue.save |
|
545 | 545 | assert_equal 1, ActionMailer::Base.deliveries.size |
|
546 | 546 | end |
|
547 | ||
|
547 | ||
|
548 | 548 | def test_stale_issue_should_not_send_email_notification |
|
549 | 549 | ActionMailer::Base.deliveries.clear |
|
550 | 550 | issue = Issue.find(1) |
@@ -738,4 +738,28 class IssueTest < ActiveSupport::TestCase | |||
|
738 | 738 | assert issue.save |
|
739 | 739 | assert_equal before, Issue.on_active_project.length |
|
740 | 740 | end |
|
741 | ||
|
742 | context "Issue#recipients" do | |
|
743 | setup do | |
|
744 | @project = Project.find(1) | |
|
745 | @issue = Issue.generate_for_project!(@project, :assigned_to => User.generate_with_protected!) | |
|
746 | end | |
|
747 | ||
|
748 | should "include project recipients" do | |
|
749 | assert @project.recipients.present? | |
|
750 | @project.recipients.each do |project_recipient| | |
|
751 | assert @issue.recipients.include?(project_recipient) | |
|
752 | end | |
|
753 | end | |
|
754 | ||
|
755 | should "include the author if the author is active" do | |
|
756 | assert @issue.author, "No author set for Issue" | |
|
757 | assert @issue.recipients.include?(@issue.author.mail) | |
|
758 | end | |
|
759 | ||
|
760 | should "include the assigned to user if the assigned to user is active" do | |
|
761 | assert @issue.assigned_to, "No assigned_to set for Issue" | |
|
762 | assert @issue.recipients.include?(@issue.assigned_to.mail) | |
|
763 | end | |
|
764 | end | |
|
741 | 765 | end |
General Comments 0
You need to be logged in to leave comments.
Login now