diff options
author | Rémy Coutable <remy@rymai.me> | 2017-05-03 17:25:31 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-05-04 17:04:36 +0200 |
commit | f1ace97f8bdc69edc481b545b779721322cec95c (patch) | |
tree | f7cc903c0c8b4b64e743a07016e0325d7d5c0fea /spec/factories | |
parent | d3768dd79698ae17cd0c82b7c78a8ead11b7e157 (diff) | |
download | gitlab-ce-f1ace97f8bdc69edc481b545b779721322cec95c.tar.gz |
Backport avatar-related spec changes from gitlab-org/gitlab-ee@4b464eaaeebackport-ee-4b464eaaee
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/groups.rb | 4 | ||||
-rw-r--r-- | spec/factories/users.rb | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/spec/factories/groups.rb b/spec/factories/groups.rb index 86f51ffca99..52f76b094a3 100644 --- a/spec/factories/groups.rb +++ b/spec/factories/groups.rb @@ -17,6 +17,10 @@ FactoryGirl.define do visibility_level Gitlab::VisibilityLevel::PRIVATE end + trait :with_avatar do + avatar { File.open(Rails.root.join('spec/fixtures/dk.png')) } + end + trait :access_requestable do request_access_enabled true end diff --git a/spec/factories/users.rb b/spec/factories/users.rb index e1ae94a08e4..33fa80772ff 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -29,6 +29,10 @@ FactoryGirl.define do after(:build) { |user, _| user.block! } end + trait :with_avatar do + avatar { File.open(Rails.root.join('spec/fixtures/dk.png')) } + end + trait :two_factor_via_otp do before(:create) do |user| user.otp_required_for_login = true |