X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/609646134bcd8fc3a7fd500848220741ecc4a9d2..e8f99cfef7cfbfcf1a1485d69250f24ced3fd609:/services/api/test/functional/arvados/v1/links_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/links_controller_test.rb b/services/api/test/functional/arvados/v1/links_controller_test.rb index 6a19bdf4ad..47e46fe837 100644 --- a/services/api/test/functional/arvados/v1/links_controller_test.rb +++ b/services/api/test/functional/arvados/v1/links_controller_test.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require 'test_helper' class Arvados::V1::LinksControllerTest < ActionController::TestCase @@ -140,6 +144,23 @@ class Arvados::V1::LinksControllerTest < ActionController::TestCase assert_equal found.count, (found.select { |f| f.tail_uuid.match User.uuid_regex }).count end + test "filter links with 'is_a' operator includes remote objects" do + authorize_with :admin + get :index, { + filters: [ + ['tail_uuid', 'is_a', 'arvados#user'], + ['link_class', '=', 'permission'], + ['name', '=', 'can_read'], + ['head_uuid', '=', collections(:foo_file).uuid], + ] + } + assert_response :success + found = assigns(:objects) + assert_not_equal 0, found.count + assert_includes(found.map(&:tail_uuid), + users(:federated_active).uuid) + end + test "filter links with 'is_a' operator with more than one" do authorize_with :admin get :index, {