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
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|