summaryrefslogtreecommitdiffstats
path: root/test/unit/user_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-16 14:40:38 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-16 14:40:38 +0000
commit0e3017dc62c672a291cda6053aaba6bda39b2de4 (patch)
tree6f80f349608597eb40c991080cf3f329ca711c23 /test/unit/user_test.rb
parente809d40f4ed988ecd98ecbc162553a5b180b3083 (diff)
downloadredmine-0e3017dc62c672a291cda6053aaba6bda39b2de4.tar.gz
redmine-0e3017dc62c672a291cda6053aaba6bda39b2de4.zip
Fixed: "Notifiy for only project I select" is randomly displayed (#7294).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4727 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/user_test.rb')
-rw-r--r--test/unit/user_test.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index 39a4d48f5..98a577ebb 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -1,5 +1,5 @@
-# redMine - project management software
-# Copyright (C) 2006 Jean-Philippe Lang
+# Redmine - project management software
+# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -507,6 +507,13 @@ class UserTest < ActiveSupport::TestCase
assert_nil @dlopper.roles_for_project(Project.find(2)).detect {|role| role.member?}
end
+ def test_valid_notification_options
+ # without memberships
+ assert_equal 5, User.find(7).valid_notification_options.size
+ # with memberships
+ assert_equal 6, User.find(2).valid_notification_options.size
+ end
+
def test_mail_notification_all
@jsmith.mail_notification = 'all'
@jsmith.notified_project_ids = []