mirror of https://github.com/mastodon/mastodon
parent
43daeccccb
commit
81cc86bb1f
@ -1,16 +1,12 @@
|
|||||||
Fabricator(:media_attachment) do
|
Fabricator(:media_attachment) do
|
||||||
account
|
account
|
||||||
|
|
||||||
file do |attrs|
|
file do |attrs|
|
||||||
[
|
case attrs[:type]
|
||||||
case attrs[:type]
|
when :gifv, :video
|
||||||
when :gifv
|
attachment_fixture('attachment.webm')
|
||||||
attachment_fixture ['attachment.gif', 'attachment.webm'].sample
|
else
|
||||||
when :image
|
attachment_fixture('attachment.jpg')
|
||||||
attachment_fixture 'attachment.jpg'
|
end
|
||||||
when nil
|
|
||||||
attachment_fixture ['attachment.gif', 'attachment.jpg', 'attachment.webm'].sample
|
|
||||||
end,
|
|
||||||
nil
|
|
||||||
].sample
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue