Mercurial > hg > soundsoftware-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
128:07fa8a8b56a8 | 210:0579821a129a |
---|---|
670 assert ! @author.notify_about?(@issue) | 670 assert ! @author.notify_about?(@issue) |
671 end | 671 end |
672 | 672 |
673 should "be false for a user with :only_my_events and isn't an author, creator, or assignee" do | 673 should "be false for a user with :only_my_events and isn't an author, creator, or assignee" do |
674 @user = User.generate_with_protected!(:mail_notification => 'only_my_events') | 674 @user = User.generate_with_protected!(:mail_notification => 'only_my_events') |
675 Member.create!(:user => @user, :project => @project, :role_ids => [1]) | |
675 assert ! @user.notify_about?(@issue) | 676 assert ! @user.notify_about?(@issue) |
676 end | 677 end |
677 | 678 |
678 should "be true for a user with :only_my_events and is the author" do | 679 should "be true for a user with :only_my_events and is the author" do |
679 @author.update_attribute(:mail_notification, 'only_my_events') | 680 @author.update_attribute(:mail_notification, 'only_my_events') |
701 end | 702 end |
702 | 703 |
703 should "be false for a user with :only_owner and is not the author" do | 704 should "be false for a user with :only_owner and is not the author" do |
704 @assignee.update_attribute(:mail_notification, 'only_owner') | 705 @assignee.update_attribute(:mail_notification, 'only_owner') |
705 assert ! @assignee.notify_about?(@issue) | 706 assert ! @assignee.notify_about?(@issue) |
707 end | |
708 | |
709 should "be true for a user with :selected and is the author" do | |
710 @author.update_attribute(:mail_notification, 'selected') | |
711 assert @author.notify_about?(@issue) | |
712 end | |
713 | |
714 should "be true for a user with :selected and is the assignee" do | |
715 @assignee.update_attribute(:mail_notification, 'selected') | |
716 assert @assignee.notify_about?(@issue) | |
717 end | |
718 | |
719 should "be false for a user with :selected and is not the author or assignee" do | |
720 @user = User.generate_with_protected!(:mail_notification => 'selected') | |
721 Member.create!(:user => @user, :project => @project, :role_ids => [1]) | |
722 assert ! @user.notify_about?(@issue) | |
706 end | 723 end |
707 end | 724 end |
708 | 725 |
709 context "other events" do | 726 context "other events" do |
710 should 'be added and tested' | 727 should 'be added and tested' |