gearheads
/
mastodon
Archived
2
0
Fork 0
This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
mastodon/spec/fabricators/media_attachment_fabricator.rb

17 lines
391 B
Ruby
Raw Normal View History

2016-09-05 17:46:36 +02:00
Fabricator(:media_attachment) do
account
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-05 17:46:36 +02:00
end