Mercurial > hg > soundsoftware-site
diff test/unit/.svn/text-base/user_test.rb.svn-base @ 210:0579821a129a
Update to Redmine trunk rev 4802
author | Chris Cannam |
---|---|
date | Tue, 08 Feb 2011 13:51:46 +0000 |
parents | 07fa8a8b56a8 |
children | 051f544170fe |
line wrap: on
line diff
--- a/test/unit/.svn/text-base/user_test.rb.svn-base Wed Jan 19 15:04:22 2011 +0000 +++ b/test/unit/.svn/text-base/user_test.rb.svn-base Tue Feb 08 13:51:46 2011 +0000 @@ -672,6 +672,7 @@ should "be false for a user with :only_my_events and isn't an author, creator, or assignee" do @user = User.generate_with_protected!(:mail_notification => 'only_my_events') + Member.create!(:user => @user, :project => @project, :role_ids => [1]) assert ! @user.notify_about?(@issue) end @@ -704,6 +705,22 @@ @assignee.update_attribute(:mail_notification, 'only_owner') assert ! @assignee.notify_about?(@issue) end + + should "be true for a user with :selected and is the author" do + @author.update_attribute(:mail_notification, 'selected') + assert @author.notify_about?(@issue) + end + + should "be true for a user with :selected and is the assignee" do + @assignee.update_attribute(:mail_notification, 'selected') + assert @assignee.notify_about?(@issue) + end + + should "be false for a user with :selected and is not the author or assignee" do + @user = User.generate_with_protected!(:mail_notification => 'selected') + Member.create!(:user => @user, :project => @project, :role_ids => [1]) + assert ! @user.notify_about?(@issue) + end end context "other events" do