Commit 3702e2ea authored by jplang's avatar jplang

Makes users optional in GET /groups/:id (#8981).

git-svn-id: e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 5794039b
......@@ -8,7 +8,7 @@ do
@group.users.each do |user|
api.user :id =>, :name =>
end if include_in_api_response?('users')
api.array :memberships do
@group.memberships.each do |membership|
......@@ -76,6 +76,15 @@ class ApiTest::GroupsTest < ActionController::IntegrationTest
assert_select 'group' do
assert_select 'name', :text => 'A Team'
assert_select 'id', :text => '10'
should "include users if requested" do
get '/groups/10.xml?include=users', {}, credentials('admin')
assert_response :success
assert_equal 'application/xml', response.content_type
assert_select 'group' do
assert_select 'users' do
assert_select 'user', Group.find(10).users.count
assert_select 'user[id=8]'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment