mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-23 12:18:06 +01:00
356df7ae6b
This fixes a random spec failures since commit
d55f207274
.
16 lines
391 B
Ruby
16 lines
391 B
Ruby
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
|
|
end
|