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.
glitchier-soc/spec/fabricators/media_attachment_fabricator.rb

15 lines
282 B

# frozen_string_literal: true
Fabricator(:media_attachment) do
account { Fabricate.build(:account) }
file do |attrs|
case attrs[:type]
when :gifv, :video
attachment_fixture('attachment.webm')
else
attachment_fixture('attachment.jpg')
end
end
end