tests
This commit is contained in:
parent
5488067801
commit
2612b0a2d1
7 changed files with 43 additions and 15 deletions
|
@ -2,11 +2,16 @@ FactoryBot.define do
|
|||
factory :commentaire do
|
||||
association :dossier, :en_construction
|
||||
email { generate(:user_email) }
|
||||
|
||||
body { 'plop' }
|
||||
|
||||
trait :with_file do
|
||||
piece_jointe { Rack::Test::UploadedFile.new('spec/fixtures/files/logo_test_procedure.png', 'image/png') }
|
||||
after(:build) do |commentaire|
|
||||
commentaire.piece_jointe.attach(
|
||||
io: File.open('spec/fixtures/files/logo_test_procedure.png'),
|
||||
filename: 'logo_test_procedure.png',
|
||||
content_type: 'image/png'
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue