X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5bbd6abc7a32c6912db5f36f0af5a923ac4b7c79..b6487d6773406f0da6724e24ad5ce6a94e1009cd:/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 c02da121e7..217809ae65 100644 --- a/services/api/test/functional/arvados/v1/groups_controller_test.rb +++ b/services/api/test/functional/arvados/v1/groups_controller_test.rb @@ -112,6 +112,24 @@ class Arvados::V1::GroupsControllerTest < ActionController::TestCase end end + [false, true].each do |include_linked| + test "list objects in home project, include_linked=#{include_linked}" do + authorize_with :active + get :contents, { + format: :json, + id: users(:active).uuid, + include_linked: include_linked, + } + assert_response :success + found_uuids = json_response['items'].collect { |i| i['uuid'] } + if include_linked + assert_includes found_uuids, collections(:empty).uuid, "empty collection did not appear in home project" + end + assert_includes found_uuids, specimens(:owned_by_active_user).uuid, "specimen did not appear in home project" + refute_includes found_uuids, specimens(:in_asubproject).uuid, "specimen appeared unexpectedly in home project" + end + end + test "user with project read permission can see project collections" do authorize_with :project_viewer get :contents, {