logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

media_attachment_fabricator.rb (391B)


  1. Fabricator(:media_attachment) do
  2. account
  3. file do |attrs|
  4. [
  5. case attrs[:type]
  6. when :gifv
  7. attachment_fixture ['attachment.gif', 'attachment.webm'].sample
  8. when :image
  9. attachment_fixture 'attachment.jpg'
  10. when nil
  11. attachment_fixture ['attachment.gif', 'attachment.jpg', 'attachment.webm'].sample
  12. end,
  13. nil
  14. ].sample
  15. end
  16. end