summaryrefslogtreecommitdiffstats
path: root/test/unit/user_preference_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-09-10 17:39:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-09-10 17:39:49 +0000
commit06efcaddfa6a62022c868e1faee1b25df8935e93 (patch)
treeacccb73c4a7a0962f3b3be6d71f14d860bd11eed /test/unit/user_preference_test.rb
parent15ab64488a3b32793dbc19907302986021cccd7e (diff)
downloadredmine-06efcaddfa6a62022c868e1faee1b25df8935e93.tar.gz
redmine-06efcaddfa6a62022c868e1faee1b25df8935e93.zip
Fixed usage of #attribute_present? in UserPreference (#13008).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12126 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/user_preference_test.rb')
-rw-r--r--test/unit/user_preference_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/user_preference_test.rb b/test/unit/user_preference_test.rb
index b0092697f..d932286b9 100644
--- a/test/unit/user_preference_test.rb
+++ b/test/unit/user_preference_test.rb
@@ -55,6 +55,11 @@ class UserPreferenceTest < ActiveSupport::TestCase
assert_kind_of Hash, up.others
end
+ def test_others_should_be_blank_after_initialization
+ pref = User.new.pref
+ assert_equal({}, pref.others)
+ end
+
def test_reading_value_from_nil_others_hash
up = UserPreference.new(:user => User.new)
up.others = nil