diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-12 15:13:34 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-12 15:13:34 +0000 |
commit | 0a2ec6ef0472fc0a14fe5793408c0546ebf39e4d (patch) | |
tree | b634c4b758b9f958e23ae968bdd481e78306f803 /test/functional/users_controller_test.rb | |
parent | 87ae744dce313076211ff472eb95edb65a048c82 (diff) | |
download | redmine-0a2ec6ef0472fc0a14fe5793408c0546ebf39e4d.tar.gz redmine-0a2ec6ef0472fc0a14fe5793408c0546ebf39e4d.zip |
Extracts user groups assignment from controller.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4499 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/users_controller_test.rb')
-rw-r--r-- | test/functional/users_controller_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 0b3231f93..c9c2c0ee3 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -183,6 +183,13 @@ class UsersControllerTest < ActionController::TestCase assert ActionMailer::Base.deliveries.empty? end + def test_update_with_group_ids_should_assign_groups + put :update, :id => 2, :user => {:group_ids => ['10']} + + user = User.find(2) + assert_equal [10], user.group_ids + end + def test_update_with_activation_should_send_a_notification u = User.new(:firstname => 'Foo', :lastname => 'Bar', :mail => 'foo.bar@somenet.foo', :language => 'fr') u.login = 'foo' |