2013-06-16 20:46:42 -04:00
|
|
|
Fabricator(:upload) do
|
|
|
|
user
|
2016-07-01 03:22:30 -04:00
|
|
|
sha1 { sequence(:sha1) { |n| Digest::SHA1.hexdigest(n.to_s) } }
|
2014-04-14 16:55:57 -04:00
|
|
|
original_filename "logo.png"
|
2013-06-16 20:46:42 -04:00
|
|
|
filesize 1234
|
|
|
|
width 100
|
|
|
|
height 200
|
2016-07-01 03:22:30 -04:00
|
|
|
url { sequence(:url) { |n| "/uploads/default/#{n}/1234567890123456.png" } }
|
2013-06-16 20:46:42 -04:00
|
|
|
end
|
2013-07-10 16:59:07 -04:00
|
|
|
|
2017-05-22 12:37:01 -04:00
|
|
|
Fabricator(:upload_s3, from: :upload) do
|
|
|
|
url { sequence(:url) { |n| "#{Discourse.store.absolute_base_url}/uploads/default/#{n}/1234567890123456.png" } }
|
|
|
|
end
|
|
|
|
|
2013-07-10 16:59:07 -04:00
|
|
|
Fabricator(:attachment, from: :upload) do
|
2013-09-06 13:18:42 -04:00
|
|
|
id 42
|
2013-07-10 16:59:07 -04:00
|
|
|
user
|
|
|
|
original_filename "archive.zip"
|
|
|
|
filesize 1234
|
2017-07-27 21:20:09 -04:00
|
|
|
url "/uploads/default/42/66b3ed1503efc936.zip"
|
2013-07-10 16:59:07 -04:00
|
|
|
end
|