X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a1e644bd3b63d97fab7ed1a1d66e00e6dea5fa1e..f4e3341d2857114e8c3ea0a7941ff8429491dd59:/services/api/test/functional/arvados/v1/groups_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/groups_controller_test.rb b/services/api/test/functional/arvados/v1/groups_controller_test.rb index cfcb33d40a..7cdf9c7ced 100644 --- a/services/api/test/functional/arvados/v1/groups_controller_test.rb +++ b/services/api/test/functional/arvados/v1/groups_controller_test.rb @@ -330,6 +330,27 @@ class Arvados::V1::GroupsControllerTest < ActionController::TestCase assert_equal 0, json_response['items'].count end + test 'get group-owned objects with select' do + authorize_with :active + get :contents, params: { + id: groups(:aproject).uuid, + limit: 100, + format: :json, + select: ["uuid", "collections.name"] + } + assert_response :success + assert_equal 17, json_response['items_available'] + assert_equal 17, json_response['items'].count + json_response['items'].each do |item| + # Expect collections to have a name field, other items should not. + if item["kind"] == "arvados#collection" + assert !item["name"].nil? + else + assert item["name"].nil? + end + end + end + test 'get group-owned objects with additional filter matching nothing' do authorize_with :active get :contents, params: {