Merge pull request #8197 from colinux/fix-api-v1-dossiers-with-avis
fix(api-v1): dossier -> avis -> piece_justificative_file_attachment relation
This commit is contained in:
commit
28dbf5ea65
2 changed files with 9 additions and 1 deletions
|
@ -280,7 +280,7 @@ class Dossier < ApplicationRecord
|
|||
.includes(commentaires: { piece_jointe_attachment: :blob },
|
||||
justificatif_motivation_attachment: :blob,
|
||||
attestation: [],
|
||||
avis: { piece_justificative_file_attachments: :blob },
|
||||
avis: { piece_justificative_file_attachment: :blob },
|
||||
traitement: [],
|
||||
etablissement: [],
|
||||
individual: [],
|
||||
|
|
|
@ -316,6 +316,14 @@ describe API::V1::DossiersController do
|
|||
it { expect(subject.first[:email]).to eq 'plop@plip.com' }
|
||||
end
|
||||
|
||||
describe 'avis' do
|
||||
let!(:avis) { create(:avis, dossier: dossier) }
|
||||
|
||||
subject { super()[:avis] }
|
||||
|
||||
it { expect(subject[0][:introduction]).to eq(avis.introduction) }
|
||||
end
|
||||
|
||||
describe 'etablissement' do
|
||||
let(:field_list) {
|
||||
[
|
||||
|
|
Loading…
Reference in a new issue