factories: add traits about files
This commit is contained in:
parent
e9115b10b5
commit
6f41f0e1c6
2 changed files with 12 additions and 0 deletions
|
@ -29,5 +29,13 @@ FactoryBot.define do
|
|||
trait :with_answer do
|
||||
answer { "Mon avis se décompose en deux points :\n- La demande semble pertinente\n- Le demandeur remplit les conditions." }
|
||||
end
|
||||
|
||||
trait :with_introduction do
|
||||
introduction_file { Rack::Test::UploadedFile.new('spec/fixtures/files/white.png', 'image/png') }
|
||||
end
|
||||
|
||||
trait :with_piece_justificative do
|
||||
piece_justificative_file { Rack::Test::UploadedFile.new('spec/fixtures/files/white.png', 'image/png') }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
FactoryBot.define do
|
||||
factory :dossier_operation_log do
|
||||
operation { :passer_en_instruction }
|
||||
|
||||
trait :with_serialized do
|
||||
serialized { Rack::Test::UploadedFile.new('spec/fixtures/files/white.png', 'image/png') }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue