When a new PJ is uploaded enqueue a anti virus scan job

This commit is contained in:
Mathieu Magnin 2018-05-11 14:59:20 +02:00
parent 927cd3c6f4
commit cd4615b10d
8 changed files with 105 additions and 0 deletions

View file

@ -17,5 +17,15 @@ FactoryBot.define do
trait :dossier_link do
type_de_champ { create(:type_de_champ_dossier_link) }
end
trait :piece_justificative do
type_de_champ { create(:type_de_champ_piece_justificative) }
end
trait :with_piece_justificative_file do
after(:create) do |champ, evaluator|
champ.piece_justificative_file.attach(io: StringIO.new("toto"), filename: "toto.txt", content_type: "text/plain")
end
end
end
end

View file

@ -0,0 +1,4 @@
FactoryBot.define do
factory :virus_scan do
end
end