Commit 581a946f authored by Valery Sizov's avatar Valery Sizov
parent e610b41e
...@@ -46,6 +46,13 @@ FactoryBot.define do ...@@ -46,6 +46,13 @@ FactoryBot.define do
secret SecureRandom.hex secret SecureRandom.hex
end end
trait :favicon_upload do
model { build(:appearance) }
path { File.join(secret, filename) }
uploader "FaviconUploader"
secret SecureRandom.hex
end
trait :attachment_upload do trait :attachment_upload do
transient do transient do
mount_point :attachment mount_point :attachment
......
...@@ -244,9 +244,11 @@ describe Gitlab::Cleanup::ProjectUploads do ...@@ -244,9 +244,11 @@ describe Gitlab::Cleanup::ProjectUploads do
orphaned1 = create(:upload, :personal_snippet_upload, :with_file) orphaned1 = create(:upload, :personal_snippet_upload, :with_file)
orphaned2 = create(:upload, :namespace_upload, :with_file) orphaned2 = create(:upload, :namespace_upload, :with_file)
orphaned3 = create(:upload, :attachment_upload, :with_file) orphaned3 = create(:upload, :attachment_upload, :with_file)
orphaned4 = create(:upload, :favicon_upload, :with_file)
paths << orphaned1.absolute_path paths << orphaned1.absolute_path
paths << orphaned2.absolute_path paths << orphaned2.absolute_path
paths << orphaned3.absolute_path paths << orphaned3.absolute_path
paths << orphaned4.absolute_path
Upload.delete_all Upload.delete_all
expect(logger).not_to receive(:info).with(/move|fix/i) expect(logger).not_to receive(:info).with(/move|fix/i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment