mirror of
https://github.com/redmine/redmine.git
synced 2026-06-25 05:31:08 +02:00
Moved new group user to its own action GroupsController#new_users.
git-svn-id: http://svn.redmine.org/redmine/trunk@13602 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -113,6 +113,18 @@ class GroupsControllerTest < ActionController::TestCase
|
||||
assert_redirected_to '/groups'
|
||||
end
|
||||
|
||||
def test_new_users
|
||||
get :new_users, :id => 10
|
||||
assert_response :success
|
||||
assert_template 'new_users'
|
||||
end
|
||||
|
||||
def test_xhr_new_users
|
||||
xhr :get, :new_users, :id => 10
|
||||
assert_response :success
|
||||
assert_equal 'text/javascript', response.content_type
|
||||
end
|
||||
|
||||
def test_add_users
|
||||
assert_difference 'Group.find(10).users.count', 2 do
|
||||
post :add_users, :id => 10, :user_ids => ['2', '3']
|
||||
|
||||
@@ -78,6 +78,10 @@ class RoutingGroupsTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
def test_groups
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/groups/567/users/new" },
|
||||
{ :controller => 'groups', :action => 'new_users', :id => '567' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/groups/567/users" },
|
||||
{ :controller => 'groups', :action => 'add_users', :id => '567' }
|
||||
|
||||
Reference in New Issue
Block a user