15467: Migrate lists to hashes
[arvados.git] / services / api / test / functional / arvados / v1 / groups_controller_test.rb
index cefb7f383076f27c65cfe3e07b2af97bab8dd9a6..30ab89c7e2aa4527960e518cdf63a95bbaef4550 100644 (file)
@@ -431,7 +431,7 @@ class Arvados::V1::GroupsControllerTest < ActionController::TestCase
   end
 
   test 'get contents with jobs and pipeline instances disabled' do
-    Rails.configuration.API.DisabledAPIs = ['jobs.index', 'pipeline_instances.index']
+    Rails.configuration.API.DisabledAPIs = {'jobs.index'=>{}, 'pipeline_instances.index'=>{}}
 
     authorize_with :active
     get :contents, params: {
@@ -591,6 +591,23 @@ class Arvados::V1::GroupsControllerTest < ActionController::TestCase
         end
       end
 
+      test "show include_trash=false #{project} #{untrash} as #{auth}" do
+        authorize_with auth
+        untrash.each do |pr|
+          Group.find_by_uuid(groups(pr).uuid).update! is_trashed: false
+        end
+        get :show, params: {
+              id: groups(project).uuid,
+              format: :json,
+              include_trash: false
+            }
+        if visible
+          assert_response :success
+        else
+          assert_response 404
+        end
+      end
+
       test "show include_trash #{project} #{untrash} as #{auth}" do
         authorize_with auth
         untrash.each do |pr|