Add a default mail notification setting for new users

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4219 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-09-28 18:36:50 +00:00
parent c059300d99
commit 582ed86d82
5 changed files with 19 additions and 1 deletions
+12
View File
@@ -60,6 +60,18 @@ class UserTest < ActiveSupport::TestCase
user.password, user.password_confirmation = "password", "password"
assert user.save
end
context "User#before_create" do
should "set the mail_notification to the default Setting" do
@user1 = User.generate_with_protected!
assert_equal 'only_my_events', @user1.mail_notification
with_settings :default_notification_option => 'all' do
@user2 = User.generate_with_protected!
assert_equal 'all', @user2.mail_notification
end
end
end
context "User.login" do
should "be case-insensitive." do