summaryrefslogtreecommitdiffstats
path: root/test/functional/users_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-13 16:38:08 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-13 16:38:08 +0000
commit10ed306b1935834afa1aad304f1ee5c21cc807d1 (patch)
tree5edcd6a4384969296e803df80870647d45184706 /test/functional/users_controller_test.rb
parent0dce4761a868eafaf216bf83e41860bf841926d8 (diff)
downloadredmine-10ed306b1935834afa1aad304f1ee5c21cc807d1.tar.gz
redmine-10ed306b1935834afa1aad304f1ee5c21cc807d1.zip
Fixed that locking and unlocking a user resets the email notification checkbox (#14020).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11839 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/users_controller_test.rb')
-rw-r--r--test/functional/users_controller_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 65aa2d7c0..bf8f444af 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -380,6 +380,18 @@ class UsersControllerTest < ActionController::TestCase
assert_equal [1, 2], u.notified_projects_ids.sort
end
+ def test_update_status_should_not_update_attributes
+ user = User.find(2)
+ user.pref[:no_self_notified] = '1'
+ user.pref.save
+
+ put :update, :id => 2, :user => {:status => 3}
+ assert_response 302
+ user = User.find(2)
+ assert_equal 3, user.status
+ assert_equal '1', user.pref[:no_self_notified]
+ end
+
def test_destroy
assert_difference 'User.count', -1 do
delete :destroy, :id => 2