diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /spec/factories/users.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/factories/users.rb')
-rw-r--r-- | spec/factories/users.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 9b5e4a981a0..476c57f2d80 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -27,6 +27,10 @@ FactoryBot.define do after(:build) { |user, _| user.block_pending_approval! } end + trait :banned do + after(:build) { |user, _| user.ban! } + end + trait :ldap_blocked do after(:build) { |user, _| user.ldap_block! } end @@ -80,6 +84,12 @@ FactoryBot.define do last_sign_in_ip { '127.0.0.1' } end + trait :with_credit_card_validation do + after :create do |user| + create :credit_card_validation, user: user + end + end + trait :two_factor_via_otp do before(:create) do |user| user.otp_required_for_login = true |