20862: Merge branch 'main' into 20862-google-api-client
[arvados.git] / services / api / test / functional / arvados / v1 / api_client_authorizations_controller_test.rb
index 9c70f6f417b6a654710b2d79e70bfa88b91ecd0b..60b4133f9a8ab9fc2dc977fb2d03caf98ea67ab0 100644 (file)
@@ -199,6 +199,19 @@ class Arvados::V1::ApiClientAuthorizationsControllerTest < ActionController::Tes
     assert_not_empty(json_response['uuid'])
   end
 
+  [
+    :active_noscope,
+    :active_all_collections,
+    :active_userlist,
+    :foo_collection_sharing_token,
+  ].each do |auth|
+    test "#{auth} can get current token without the appropriate scope" do
+      authorize_with auth
+      get :current
+      assert_response :success
+    end
+  end
+
   test "get current token, no auth" do
     get :current
     assert_response 401