diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2017-02-06 17:37:05 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-02-24 16:50:20 +0530 |
commit | 8e684809765fa866a125c176327825ebc565f5b3 (patch) | |
tree | 2086025a88fbdefbb355061eaf468e1db593adc9 /spec/factories | |
parent | 53c34c7436112d7cac9c3887ada1d5ae630a206c (diff) | |
download | gitlab-ce-8e684809765fa866a125c176327825ebc565f5b3.tar.gz |
Use a `ghost` boolean to track ghost users.
Rather than using a separate `ghost` state. This lets us have the benefits of
both ghost and blocked users (ghost: true, state: blocked) without having to
rewrite a number of queries to include cases for `state: ghost`.
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/users.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 1732b1a0081..58602c54c7a 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -26,6 +26,10 @@ FactoryGirl.define do two_factor_via_otp end + trait :ghost do + ghost true + end + trait :two_factor_via_otp do before(:create) do |user| user.otp_required_for_login = true |