X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/22c135139279edcf5be0218eb90c375f2433a4b9..5f7b9f0177ca5a045eddb791116f5e6ff823f7fc:/services/api/test/functional/arvados/v1/collections_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/collections_controller_test.rb b/services/api/test/functional/arvados/v1/collections_controller_test.rb index 0412072dbc..269474a5f7 100644 --- a/services/api/test/functional/arvados/v1/collections_controller_test.rb +++ b/services/api/test/functional/arvados/v1/collections_controller_test.rb @@ -68,6 +68,18 @@ class Arvados::V1::CollectionsControllerTest < ActionController::TestCase assert_equal unique_uuids.count, resp['items'].count end + test "items.count == items_available with filters" do + authorize_with :active + get :index, { + limit: 100, + filters: [['uuid','=',collections(:foo_file).uuid]] + } + assert_response :success + assert_equal 1, assigns(:objects).length + assert_equal 1, json_response['items_available'] + assert_equal 1, json_response['items'].count + end + test "get index with limit=2 offset=99999" do # Assume there are not that many test fixtures. authorize_with :active @@ -335,12 +347,12 @@ EOS test "search collections with 'any' operator" do authorize_with :active get :index, { - where: { any: ['contains', '7f9102c395f4ffc5e3'] } + where: { any: ['contains', 'd0bc8c7f34be170a7b7b'] } } assert_response :success found = assigns(:objects).collect(&:portable_data_hash) - assert_equal 2, found.count - assert_equal true, !!found.index('1f4b0bc7583c2a7f9102c395f4ffc5e3+45') + assert_equal 1, found.count + assert_equal true, !!found.index('5bd9c1ad0bc8c7f34be170a7b7b39089+45') end [false, true].each do |permit_unsigned|