闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
391 B

  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