| 1045 | 
  1045 | 
  
        only_my_events_user = User.generate!(:mail_notification => 'only_my_events') 
   | 
  | 1046 | 
  1046 | 
  
        Member.create!(:project => project, :roles => [role], :principal => only_my_events_user) 
   | 
  | 1047 | 
  1047 | 
  
    
   | 
  | 1048 | 
   | 
  
        bookmarked_user = User.generate!(:mail_notification => 'bookmarked') 
   | 
  | 1049 | 
   | 
  
        Member.create!(:project => project, :roles => [role], :principal => bookmarked_user) 
   | 
   | 
  1048 | 
  
        bookmarked_and_member_user = User.generate!(:mail_notification => 'bookmarked') 
   | 
   | 
  1049 | 
  
        Member.create!(:project => project, :roles => [role], :principal => bookmarked_and_member_user) 
   | 
   | 
  1050 | 
  
        pjb = Redmine::ProjectJumpBox.new bookmarked_and_member_user 
   | 
   | 
  1051 | 
  
        pjb.bookmark_project project 
   | 
   | 
  1052 | 
  
        bookmarked_and_member_user.update_notified_bookmarked_project_ids(project) 
   | 
   | 
  1053 | 
  
    
   | 
   | 
  1054 | 
  
        bookmarked_and_nonmember_user = User.generate!(:mail_notification => 'bookmarked') 
   | 
   | 
  1055 | 
  
        pjb = Redmine::ProjectJumpBox.new bookmarked_and_nonmember_user 
   | 
   | 
  1056 | 
  
        pjb.bookmark_project project 
   | 
   | 
  1057 | 
  
        bookmarked_and_member_user.update_notified_bookmarked_project_ids(project) 
   | 
  | 1050 | 
  1058 | 
  
    
   | 
  | 1051 | 
  1059 | 
  
        only_assigned_user = User.generate!(:mail_notification => 'only_assigned') 
   | 
  | 1052 | 
  1060 | 
  
        Member.create!(:project => project, :roles => [role], :principal => only_assigned_user) 
   | 
  | ... | ... |  | 
  | 1062 | 
  1070 | 
  
               "should not include users with the 'none' notification option" 
   | 
  | 1063 | 
  1071 | 
  
        assert !project.notified_users.include?(only_my_events_user), 
   | 
  | 1064 | 
  1072 | 
  
               "should not include users with the 'only_my_events' notification option" 
   | 
  | 1065 | 
   | 
  
        assert !project.notified_users.include?(bookmarked_user), 
   | 
  | 1066 | 
   | 
  
               "should not include users with the 'bookmarked' notification option" 
   | 
   | 
  1073 | 
  
        assert project.notified_users.include?(bookmarked_and_member_user), 
   | 
   | 
  1074 | 
  
               "should include users with the 'bookmarked' notification option" 
   | 
   | 
  1075 | 
  
        assert !project.notified_users.include?(bookmarked_and_nonmember_user), 
   | 
   | 
  1076 | 
  
               "should not include member users with the 'bookmarked' notification option" 
   | 
  | 1067 | 
  1077 | 
  
        assert !project.notified_users.include?(only_assigned_user), 
   | 
  | 1068 | 
   | 
  
               "should not include users with the 'only_assigned' notification option" 
   | 
   | 
  1078 | 
  
               "should not include non-member users with the 'only_assigned' notification option" 
   | 
  | 1069 | 
  1079 | 
  
        assert !project.notified_users.include?(only_owned_user), 
   | 
  | 1070 | 
  1080 | 
  
               "should not include users with the 'only_owner' notification option" 
   | 
  | 1071 | 
  1081 | 
  
      end 
   |