Merge branch '20272-description-label' refs #20272
[arvados.git] / services / api / test / factories / api_client_authorization.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 FactoryBot.define do
6   factory :api_client_authorization do
7     scopes { ['all'] }
8
9     factory :token do
10       # Just provides shorthand for "create :api_client_authorization"
11     end
12
13     to_create do |instance|
14       CurrentApiClientHelper.act_as_user instance.user do
15         instance.save!
16       end
17     end
18   end
19 end