remove unused method

This commit is contained in:
simon lehericey 2022-04-04 17:36:17 +02:00
parent 4c3b9979e9
commit 1f98f75ccc
2 changed files with 0 additions and 24 deletions

View file

@ -7,13 +7,6 @@ class PiecesJustificativesService
pjs_champs + pjs_commentaires + pjs_dossier
end
def self.liste_pieces_justificatives(dossier)
pjs_champs = pjs_for_champs(dossier)
pjs_commentaires = pjs_for_commentaires(dossier)
pjs_champs + pjs_commentaires
end
def self.serialize_types_de_champ_as_type_pj(revision)
tdcs = revision.types_de_champ.filter { |type_champ| type_champ.old_pj.present? }
tdcs.map.with_index do |type_champ, order_place|

View file

@ -15,23 +15,6 @@ describe PiecesJustificativesService do
create(:dossier_operation_log, dossier: dossier, bill_signature: bill_signature)
end
describe '.liste_pieces_justificatives' do
subject { PiecesJustificativesService.liste_pieces_justificatives(dossier) }
it "doesn't return sensitive documents like titre_identite" do
expect(champ_identite.piece_justificative_file).to be_attached
expect(subject.any? { |piece| piece.name == 'piece_justificative_file' }).to be_falsy
end
it "doesn't return export pdf of the dossier" do
expect(subject.any? { |piece| piece.name == 'pdf_export_for_instructeur' }).to be_falsy
end
it "doesn't return operation logs of the dossier" do
expect(subject.any? { |piece| piece.name == 'serialized' }).to be_falsy
end
end
describe '.liste_documents' do
subject { PiecesJustificativesService.liste_documents(dossier, false) }