summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-03-10 03:35:22 +0000
committerGo MAEDA <maeda@farend.jp>2021-03-10 03:35:22 +0000
commit34310eece6a60322e29ee67e44c7a6f9dfe69ef3 (patch)
tree73f0819068e0e0f29b09eb45d8050809c27b5249 /test
parent7152e5b9df3b0efd4b3db0f9b9ab1b0efd7e8185 (diff)
downloadredmine-34310eece6a60322e29ee67e44c7a6f9dfe69ef3.tar.gz
redmine-34310eece6a60322e29ee67e44c7a6f9dfe69ef3.zip
Ability to set default value for "I don't want to be notified of changes that I make myself" (#34787).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@20771 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/user_preference_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/user_preference_test.rb b/test/unit/user_preference_test.rb
index a95d7a9f7..08c00a84e 100644
--- a/test/unit/user_preference_test.rb
+++ b/test/unit/user_preference_test.rb
@@ -50,6 +50,13 @@ class UserPreferenceTest < ActiveSupport::TestCase
assert_equal true, preference.no_self_notified
end
+ def test_no_self_notified_should_default_to_setting
+ with_settings :default_users_no_self_notified => '0' do
+ preference = UserPreference.new
+ assert_equal false, preference.no_self_notified
+ end
+ end
+
def test_create
user = User.new(:firstname => "new", :lastname => "user", :mail => "newuser@somenet.foo")
user.login = "newuser"