From 05a9275fdaabf5fd38f060fb9bd96456d4db3dd6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 3 Apr 2016 11:33:28 +0000 Subject: "I don't want to be notified of changes that I make myself" as Default for all User (#14574). git-svn-id: http://svn.redmine.org/redmine/trunk@15288 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/issue_test.rb | 2 +- test/unit/mail_handler_test.rb | 2 +- test/unit/user_preference_test.rb | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'test/unit') diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 3daca7184..a07b18ff5 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -18,7 +18,7 @@ require File.expand_path('../../test_helper', __FILE__) class IssueTest < ActiveSupport::TestCase - fixtures :projects, :users, :email_addresses, :members, :member_roles, :roles, + fixtures :projects, :users, :email_addresses, :user_preferences, :members, :member_roles, :roles, :groups_users, :trackers, :projects_trackers, :enabled_modules, diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 1cba22f80..f08f2a6cd 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -22,7 +22,7 @@ require File.expand_path('../../test_helper', __FILE__) class MailHandlerTest < ActiveSupport::TestCase fixtures :users, :projects, :enabled_modules, :roles, :members, :member_roles, :users, - :email_addresses, + :email_addresses, :user_preferences, :issues, :issue_statuses, :workflows, :trackers, :projects_trackers, :versions, :enumerations, :issue_categories, diff --git a/test/unit/user_preference_test.rb b/test/unit/user_preference_test.rb index a2f3c7f1f..7303d178f 100644 --- a/test/unit/user_preference_test.rb +++ b/test/unit/user_preference_test.rb @@ -32,6 +32,11 @@ class UserPreferenceTest < ActiveSupport::TestCase end end + def test_no_self_notified_should_default_to_true + preference = UserPreference.new + assert_equal true, preference.no_self_notified + end + def test_create user = User.new(:firstname => "new", :lastname => "user", :mail => "newuser@somenet.foo") user.login = "newuser" @@ -67,11 +72,6 @@ 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 -- cgit v1.2.3