update serializers specs to use revisions

This commit is contained in:
Paul Chavard 2020-08-27 19:57:13 +02:00
parent d1e0b65658
commit 4c0f9a4d61
2 changed files with 6 additions and 8 deletions

View file

@ -49,12 +49,11 @@ describe DossierSerializer do
context 'when a type de champ PJ was cloned from a legacy PJ' do
let(:original_pj_id) { 3 }
let(:cloned_type_de_champ) do
tdc = create(:type_de_champ_piece_justificative,
build(:type_de_champ_piece_justificative,
libelle: "Vidéo de votre demande de subvention",
description: "Pour optimiser vos chances, soignez la chorégraphie et privilégiez le chant polyphonique.\r\nRécupérer le formulaire vierge pour mon dossier : https://www.dance-academy.gouv.fr",
order_place: 0)
tdc.old_pj = { stable_id: original_pj_id }
tdc
old_pj: { stable_id: original_pj_id },
position: 0)
end
let(:procedure) { create(:procedure, :published, types_de_champ: [cloned_type_de_champ]) }
let(:dossier) { create(:dossier, procedure: procedure) }

View file

@ -12,12 +12,11 @@ describe ProcedureSerializer do
context 'when a type PJ was cloned to a type champ PJ' do
let(:original_pj_id) { 3 }
let(:cloned_type_de_champ) do
tdc = create(:type_de_champ_piece_justificative,
build(:type_de_champ_piece_justificative,
libelle: "Vidéo de votre demande de subvention",
description: "Pour optimiser vos chances, soignez la chorégraphie et privilégiez le chant polyphonique.\r\nRécupérer le formulaire vierge pour mon dossier : https://www.dance-academy.gouv.fr",
order_place: 0)
tdc.old_pj = { stable_id: original_pj_id }
tdc
old_pj: { stable_id: original_pj_id },
position: 0)
end
let(:procedure) { create(:procedure, :published, types_de_champ: [cloned_type_de_champ]) }