diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-13 21:16:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-13 21:16:51 +0300 |
commit | 46e1fdb8bbdaf149371334f1a1757ba4d68fe020 (patch) | |
tree | c2a0bd6da129d9d41cef38e7a6c0efd2c79de893 /spec/factories | |
parent | 57ed4c594d37326f1d27752df575b581c522ab05 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories')
-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 |