2016-09-06 00:46:36 +09:00
|
|
|
Fabricator(:media_attachment) do
|
2017-04-08 01:50:43 +09:00
|
|
|
account
|
2017-06-21 03:40:45 +09:00
|
|
|
file do |attrs|
|
|
|
|
[
|
|
|
|
case attrs[:type]
|
|
|
|
when :gifv
|
|
|
|
attachment_fixture ['attachment.gif', 'attachment.webm'].sample
|
|
|
|
when :image
|
|
|
|
attachment_fixture 'attachment.jpg'
|
|
|
|
when nil
|
|
|
|
attachment_fixture ['attachment.gif', 'attachment.jpg', 'attachment.webm'].sample
|
|
|
|
end,
|
|
|
|
nil
|
|
|
|
].sample
|
|
|
|
end
|
2016-09-06 00:46:36 +09:00
|
|
|
end
|