Add 'sdk/java-v2/' from commit '55f103e336ca9fb8bf1720d2ef4ee8dd4e221118'
[arvados.git] / services / api / test / factories / api_client_authorization.rb
index 8bd569e8eb2562449227f96c33428e434c4045aa..af2660a5ff816df9121a83326a3cafd5e440c2c7 100644 (file)
@@ -1,7 +1,11 @@
-FactoryGirl.define do
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+FactoryBot.define do
   factory :api_client_authorization do
     api_client
-    scopes ['all']
+    scopes { ['all'] }
 
     trait :trusted do
       association :api_client, factory: :api_client, is_trusted: true
@@ -11,7 +15,7 @@ FactoryGirl.define do
     end
 
     to_create do |instance|
-      act_as_user instance.user do
+      CurrentApiClientHelper.act_as_user instance.user do
         instance.save!
       end
     end