Skip to content
Extraits de code Groupes Projets
Valider 356df7ae rédigé par Akihiko Odaki (@fn_aki@pawoo.net)'s avatar Akihiko Odaki (@fn_aki@pawoo.net) Validation de Eugen Rochko
Parcourir les fichiers

Update fabricator for MediaAttachment to attach a file according to type (#3862)

This fixes a random spec failures since commit
d55f2072.
parent 8f03fdce
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Fabricator(:media_attachment) do Fabricator(:media_attachment) do
account account
file { [attachment_fixture(['attachment.gif', 'attachment.jpg', 'attachment.webm'].sample), nil].sample } file do |attrs|
[
case attrs[:type]
when :gifv
attachment_fixture ['attachment.gif', 'attachment.webm'].sample
when :image
attachment_fixture 'attachment.jpg'
when nil
attachment_fixture ['attachment.gif', 'attachment.jpg', 'attachment.webm'].sample
end,
nil
].sample
end
end end
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter