fix(api-v1): dossier -> avis -> piece_justificative_file_attachment relation name
This commit is contained in:
parent
6207e633d7
commit
4ba76e6844
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