Commit c2bc04ad authored by jplang's avatar jplang

Hide email by default for new users (#21042).

git-svn-id: https://svn.redmine.org/redmine/trunk@14726 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent f4b97c03
class ChangeUserPreferencesHideMailDefaultToTrue < ActiveRecord::Migration
def self.up
change_column :user_preferences, :hide_mail, :boolean, :default => true
end
def self.down
change_column :user_preferences, :hide_mail, :boolean, :default => false
end
end
......@@ -20,6 +20,11 @@ require File.expand_path('../../test_helper', __FILE__)
class UserPreferenceTest < ActiveSupport::TestCase
fixtures :users, :user_preferences
def test_hide_mail_should_default_to_true
preference = UserPreference.new
assert_equal true, preference.hide_mail
end
def test_create
user = User.new(:firstname => "new", :lastname => "user", :mail => "newuser@somenet.foo")
user.login = "newuser"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment