refactor(gallery): add attachment_gallery_item component

This commit is contained in:
Eric Leroy-Terquem 2024-09-06 17:17:57 +02:00
parent 6b1c6a796a
commit bae752f1aa
No known key found for this signature in database
GPG key ID: 53D8FAECEF207605
6 changed files with 96 additions and 39 deletions

View file

@ -1513,7 +1513,9 @@ describe Instructeurs::DossiersController, type: :controller do
expect(response.body).to include('Télécharger le fichier logo_test_procedure.png')
expect(response.body).to include('Télécharger le fichier RIB.pdf')
expect(response.body).to include('Visualiser')
expect(assigns(:attachments_and_libelles).count).to eq 3
expect(assigns(:gallery_attachments).count).to eq 3
expect(assigns(:gallery_attachments)).to all(be_a(ActiveStorage::Attachment))
expect([Champs::PieceJustificativeChamp, Champs::TitreIdentiteChamp, Commentaire]).to include(*assigns(:gallery_attachments).map { _1.record.class })
end
end
end