media_attachment_fabricator.rb 221 B

123456789101112
  1. Fabricator(:media_attachment) do
  2. account
  3. file do |attrs|
  4. case attrs[:type]
  5. when :gifv, :video
  6. attachment_fixture('attachment.webm')
  7. else
  8. attachment_fixture('attachment.jpg')
  9. end
  10. end
  11. end