Merge branch '12316-fix-provenance-graph'
[arvados.git] / services / api / test / integration / groups_test.rb
index 6226ffd16c20cc1b65bf4da97f81c149f9de8eb1..c4ab3cffc8877ffea777424b432122252f60440a 100644 (file)
@@ -99,7 +99,8 @@ class GroupsTest < ActionDispatch::IntegrationTest
   test "group contents with include trash collections" do
     get "/arvados/v1/groups/contents", {
       include_trash: "true",
-      filters: [["uuid", "is_a", "arvados#collection"]].to_json
+      filters: [["uuid", "is_a", "arvados#collection"]].to_json,
+      limit: 1000
     }, auth(:active)
     assert_response 200
 
@@ -108,4 +109,17 @@ class GroupsTest < ActionDispatch::IntegrationTest
     assert_includes coll_uuids, collections(:foo_collection_in_aproject).uuid
     assert_includes coll_uuids, collections(:expired_collection).uuid
   end
+
+  test "group contents without trash collections" do
+    get "/arvados/v1/groups/contents", {
+      filters: [["uuid", "is_a", "arvados#collection"]].to_json,
+      limit: 1000
+    }, auth(:active)
+    assert_response 200
+
+    coll_uuids = []
+    json_response['items'].each { |c| coll_uuids << c['uuid'] }
+    assert_includes coll_uuids, collections(:foo_collection_in_aproject).uuid
+    assert_not_includes coll_uuids, collections(:expired_collection).uuid
+  end
 end