specs: rename Dossier's with_all_champs to with_populated_champs

This better reflects what the trait is used for, and disambiguate it
from the similarly named trait in the Procedure factory.
This commit is contained in:
Pierre de La Morinerie 2021-11-03 14:52:53 +00:00
parent 6c60c940d4
commit b06183d7bf
8 changed files with 19 additions and 19 deletions

View file

@ -32,7 +32,7 @@ describe ProcedureExportService do
end
describe 'Dossiers sheet' do
let!(:dossier) { create(:dossier, :en_instruction, :with_all_champs, :with_individual, procedure: procedure) }
let!(:dossier) { create(:dossier, :en_instruction, :with_populated_champs, :with_individual, procedure: procedure) }
let(:nominal_headers) do
[
@ -119,7 +119,7 @@ describe ProcedureExportService do
describe 'Etablissement sheet' do
let(:procedure) { create(:procedure, :published, :with_all_champs) }
let!(:dossier) { create(:dossier, :en_instruction, :with_all_champs, :with_entreprise, procedure: procedure) }
let!(:dossier) { create(:dossier, :en_instruction, :with_populated_champs, :with_entreprise, procedure: procedure) }
let(:dossier_etablissement) { etablissements_sheet.data[1] }
let(:champ_etablissement) { etablissements_sheet.data[0] }
@ -309,7 +309,7 @@ describe ProcedureExportService do
end
describe 'Avis sheet' do
let!(:dossier) { create(:dossier, :en_instruction, :with_all_champs, :with_individual, procedure: procedure) }
let!(:dossier) { create(:dossier, :en_instruction, :with_populated_champs, :with_individual, procedure: procedure) }
let!(:avis) { create(:avis, :with_answer, dossier: dossier) }
it 'should have headers' do
@ -332,8 +332,8 @@ describe ProcedureExportService do
describe 'Repetitions sheet' do
let!(:dossiers) do
[
create(:dossier, :en_instruction, :with_all_champs, :with_individual, procedure: procedure),
create(:dossier, :en_instruction, :with_all_champs, :with_individual, procedure: procedure)
create(:dossier, :en_instruction, :with_populated_champs, :with_individual, procedure: procedure),
create(:dossier, :en_instruction, :with_populated_champs, :with_individual, procedure: procedure)
]
end
let(:champ_repetition) { dossiers.first.champs.find { |champ| champ.type_champ == 'repetition' } }
@ -381,7 +381,7 @@ describe ProcedureExportService do
end
context 'with non unique labels' do
let(:dossier) { create(:dossier, :en_instruction, :with_all_champs, :with_individual, procedure: procedure) }
let(:dossier) { create(:dossier, :en_instruction, :with_populated_champs, :with_individual, procedure: procedure) }
let(:champ_repetition) { dossier.champs.find { |champ| champ.type_champ == 'repetition' } }
let(:type_de_champ_repetition) { create(:type_de_champ_repetition, procedure: procedure, libelle: champ_repetition.libelle) }
let!(:another_champ_repetition) { create(:champ_repetition, type_de_champ: type_de_champ_repetition, dossier: dossier) }