diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 12:10:29 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 12:10:29 +0000 |
commit | 5564275a0b378298dc6281599cbfe71a937109ff (patch) | |
tree | a468e1e60046356410219c35c23a8a428c5e2c5e /spec/factories | |
parent | d87918510a866a5fcbbc2f899ad65c6938ebf5f5 (diff) | |
download | gitlab-ce-5564275a0b378298dc6281599cbfe71a937109ff.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/deploy_tokens.rb | 9 | ||||
-rw-r--r-- | spec/factories/group_deploy_tokens.rb | 8 | ||||
-rw-r--r-- | spec/factories/users.rb | 4 |
3 files changed, 21 insertions, 0 deletions
diff --git a/spec/factories/deploy_tokens.rb b/spec/factories/deploy_tokens.rb index 42ed66ac191..e86d4ab8812 100644 --- a/spec/factories/deploy_tokens.rb +++ b/spec/factories/deploy_tokens.rb @@ -9,6 +9,7 @@ FactoryBot.define do read_registry { true } revoked { false } expires_at { 5.days.from_now } + deploy_token_type { DeployToken.deploy_token_types[:project_type] } trait :revoked do revoked { true } @@ -21,5 +22,13 @@ FactoryBot.define do trait :expired do expires_at { Date.today - 1.month } end + + trait :group do + deploy_token_type { DeployToken.deploy_token_types[:group_type] } + end + + trait :project do + deploy_token_type { DeployToken.deploy_token_types[:project_type] } + end end end diff --git a/spec/factories/group_deploy_tokens.rb b/spec/factories/group_deploy_tokens.rb new file mode 100644 index 00000000000..9ec7d0701be --- /dev/null +++ b/spec/factories/group_deploy_tokens.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :group_deploy_token do + group + deploy_token + end +end diff --git a/spec/factories/users.rb b/spec/factories/users.rb index f83c137b758..34f6da682b6 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -23,6 +23,10 @@ FactoryBot.define do after(:build) { |user, _| user.block! } end + trait :bot do + bot_type { User.bot_types[:alert_bot] } + end + trait :external do external { true } end |