3 class GroupsTest < ActionDispatch::IntegrationTest
5 test "get all pages of group-owned objects" do
14 get "/arvados/v1/groups/contents", {
15 id: groups(:aproject).uuid,
21 assert_response :success
22 assert_operator(0, :<, json_response['items'].count,
23 "items_available=#{items_available} but received 0 "\
24 "items with offset=#{offset}")
25 items_available ||= json_response['items_available']
26 assert_equal(items_available, json_response['items_available'],
27 "items_available changed between page #{offset/limit} "\
28 "and page #{1+offset/limit}")
29 json_response['items'].each do |item|
31 assert_equal(nil, uuid_received[uuid],
32 "Received '#{uuid}' again on page #{1+offset/limit}")
33 uuid_received[uuid] = true
34 owner_received[item['owner_uuid']] = true
36 assert_equal groups(:aproject).uuid, item['owner_uuid']
38 break if offset >= items_available