+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
require 'test_helper'
class ResourceListTest < ActiveSupport::TestCase
+ reset_api_fixtures :after_each_test, false
+
test 'links_for on a resource list that does not return links' do
use_token :active
results = Specimen.all
assert_equal c.result_limit, a
end
+ test 'get empty set' do
+ use_token :admin
+ c = Collection.
+ where(owner_uuid: 'doesn-texis-tdoesntexistdoe').
+ fetch_multiple_pages(false)
+ # Important: check c.result_offset before calling c.results here.
+ assert_equal 0, c.result_offset
+ assert_equal 0, c.items_available
+ assert_empty c.results
+ end
+
+ test 'count=none' do
+ use_token :active
+ c = Collection.with_count('none')
+ assert_nil c.items_available
+ refute_empty c.results
+ end
end