mirror of
https://github.com/redmine/redmine.git
synced 2026-07-06 01:47:55 +02:00
Extracts user groups assignment from controller.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4499 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user