closes #11840
[arvados.git] / services / api / test / integration / groups_test.rb
index 2afece9563c092a1ad221883ba601e9334de3aa0..c26f6be4cafe165f3cf4b680759cd9b6a41337ad 100644 (file)
@@ -91,4 +91,17 @@ class GroupsTest < ActionDispatch::IntegrationTest
     }, auth(:active)
     assert_response 422
   end
+
+  test "group contents with include trash collections" do
+    get "/arvados/v1/groups/contents", {
+      include_trash: "true",
+      filters: [["uuid", "is_a", "arvados#collection"]].to_json
+    }, 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_includes coll_uuids, collections(:expired_collection).uuid
+  end
 end