summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorMicaël Bergeron <mbergeron@gitlab.com>2018-02-21 11:43:21 -0500
committerMicaël Bergeron <mbergeron@gitlab.com>2018-03-01 10:34:30 -0500
commit0f1d348d683fdef6c36c3b244c85e59f582ff886 (patch)
tree5558ab163c6154e76a36b6345d22deb302eacc82 /spec/factories
parenta2f375e8f74870dcdcfa1c7886bd1c14c80a684e (diff)
downloadgitlab-ce-0f1d348d683fdef6c36c3b244c85e59f582ff886.tar.gz
port the object storage to CE
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/appearances.rb17
-rw-r--r--spec/factories/uploads.rb5
2 files changed, 20 insertions, 2 deletions
diff --git a/spec/factories/appearances.rb b/spec/factories/appearances.rb
index 5f9c57c0c8d..85db098080c 100644
--- a/spec/factories/appearances.rb
+++ b/spec/factories/appearances.rb
@@ -2,8 +2,21 @@
FactoryBot.define do
factory :appearance do
- title "MepMep"
- description "This is my Community Edition instance"
+ title "GitLab Enterprise Edition"
+ description "Open source software to collaborate on code"
new_project_guidelines "Custom project guidelines"
end
+
+ trait :with_logo do
+ logo { fixture_file_upload('spec/fixtures/dk.png') }
+ end
+
+ trait :with_header_logo do
+ header_logo { fixture_file_upload('spec/fixtures/dk.png') }
+ end
+
+ trait :with_logos do
+ with_logo
+ with_header_logo
+ end
end
diff --git a/spec/factories/uploads.rb b/spec/factories/uploads.rb
index cd75cbf8adf..008d9616216 100644
--- a/spec/factories/uploads.rb
+++ b/spec/factories/uploads.rb
@@ -6,6 +6,7 @@ FactoryBot.define do
store ObjectStorage::Store::LOCAL
mount_point :avatar
secret nil
+ store ObjectStorage::Store::LOCAL
# we should build a mount agnostic upload by default
transient do
@@ -28,6 +29,10 @@ FactoryBot.define do
secret SecureRandom.hex
end
+ trait :object_storage do
+ store ObjectStorage::Store::REMOTE
+ end
+
trait :namespace_upload do
model { build(:group) }
path { File.join(secret, filename) }