diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-30 06:10:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-01-30 06:10:36 +0000 |
commit | 27a319e66d435a8cee85de449d076ef72e1044c4 (patch) | |
tree | c1a39872ebdaf5aa9e52a617937b65ce29165b4e /test | |
parent | 7be5bf6e4da8affcb73be3302b10c86de66af3be (diff) | |
download | redmine-27a319e66d435a8cee85de449d076ef72e1044c4.tar.gz redmine-27a319e66d435a8cee85de449d076ef72e1044c4.zip |
Merged r4727 and r4730 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@4771 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/user_test.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index a213332b3..9bb1ae62d 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 @@ -303,6 +303,19 @@ 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_valid_notification_options_class_method + assert_equal 5, User.valid_notification_options.size + assert_equal 5, User.valid_notification_options(User.find(7)).size + assert_equal 6, User.valid_notification_options(User.find(2)).size + end + def test_mail_notification_all @jsmith.mail_notification = 'all' @jsmith.notified_project_ids = [] |