refactor(spec): stop using procedure type de champs traits as :with_datetime
, :with_xxx
in favor of :types_de_champ_public
which keeps position in check
This commit is contained in:
parent
15e0ed8480
commit
2952987ad8
35 changed files with 167 additions and 293 deletions
|
@ -1,6 +1,6 @@
|
|||
describe DataFixer::DossierChampsMissing do
|
||||
describe '#fix' do
|
||||
let(:procedure) { create(:procedure, :with_datetime, :with_dossier_link) }
|
||||
let(:procedure) { create(:procedure, types_de_champ_public: [{ type: :datetime }, { type: :dossier_link }]) }
|
||||
let(:dossier) { create(:dossier, procedure:) }
|
||||
|
||||
context 'when dossier does not have a fork' do
|
||||
|
@ -34,7 +34,7 @@ describe DataFixer::DossierChampsMissing do
|
|||
end
|
||||
|
||||
context 'when dossier have missing champ on repetition' do
|
||||
let(:procedure) { create(:procedure, :with_repetition) }
|
||||
let(:procedure) { create(:procedure, types_de_champ_public: [{ type: :repetition, children: [{ type: :text }, { type: :decimal_number }] }]) }
|
||||
let(:dossier) { create(:dossier, :with_populated_champs, procedure:) }
|
||||
let(:champ_repetition) { dossier.champs_public.first }
|
||||
let(:initial_champ_count) { dossier.champs.count }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue