diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
commit | 9297025d0b7ddf095eb618dfaaab2ff8f2018d8b (patch) | |
tree | 865198c01d1824a9b098127baa3ab980c9cd2c06 /spec/factories/personal_access_tokens.rb | |
parent | 6372471f43ee03c05a7c1f8b0c6ac6b8a7431dbe (diff) |
Add latest changes from gitlab-org/gitlab@16-7-stable-eev16.7.0-rc42
Diffstat (limited to 'spec/factories/personal_access_tokens.rb')
-rw-r--r-- | spec/factories/personal_access_tokens.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/factories/personal_access_tokens.rb b/spec/factories/personal_access_tokens.rb index c7361b11633..7e6fe96d3ed 100644 --- a/spec/factories/personal_access_tokens.rb +++ b/spec/factories/personal_access_tokens.rb @@ -36,5 +36,11 @@ FactoryBot.define do trait :no_prefix do after(:build) { |personal_access_token| personal_access_token.set_token(Devise.friendly_token) } end + + trait :dependency_proxy_scopes do + before(:create) do |personal_access_token| + personal_access_token.scopes = (personal_access_token.scopes + Gitlab::Auth::REPOSITORY_SCOPES).uniq + end + end end end |