media_attachment_fabricator.rb 282 B

1234567891011121314
  1. # frozen_string_literal: true
  2. Fabricator(:media_attachment) do
  3. account { Fabricate.build(:account) }
  4. file do |attrs|
  5. case attrs[:type]
  6. when :gifv, :video
  7. attachment_fixture('attachment.webm')
  8. else
  9. attachment_fixture('attachment.jpg')
  10. end
  11. end
  12. end